Tag Info

Hot answers tagged

2

I have seen this sort of thing before and the problem ended up being in how the page was coded: onmouseover vs onchange in our case. You may want to look at the the javascript events for the page, as it sounds very possible that the human interaction is causing some method to run whereas the web driver is changing objects in the DOM, and allowing web driver ...


1

Something like this should work: public boolean isTextOnPagePresent(String text) { WebElement body = driver.findElement(By.tagName("body")); String bodyText = body.getText(); return bodyText.contains(text); } Currently I have no possibility to test that. If it should not work, you could try to use getPageSource() instead of get the text of the ...


1

If I understand correctly, you are looking at ways to make your tests more efficient, so you can get as quickly as possible to the desired state and then perform the actual assertion that the test case is intended to cover. There are a couple of options you have: Use a class setup method, or application setup method to log in, then re-use your existing, ...



Only top voted, non community-wiki answers of a minimum length are eligible