-1

Have some trouble with making the test in Selenium. I have, like simple test (where you have to select answers and proceed). For assuring that test is finished I want to check that the //span[contains(text(),'%Finishing exam popup text%')] is not visible. And while it is not visible - do some other stuff to proceeding in the test. Can somebody help me or give some better advice how to do such test?

TimoStaudinger
  • 41,396
  • 16
  • 88
  • 94

1 Answers1

0

You can try:

WebDriverWait wait = new WebDriverWait(driver, 90);
wait.until(ExpectedConditions.invisibilityOfElementLocated(By.xpath("//span[contains(text(),'%Finishing exam popup text%')]")));
Angusiasty
  • 367
  • 2
  • 14
  • Then test will wait until the pop-up appears. And I want to do the test that will do something until pop-up will appear. For example - press on some button and do this until the pop-up with text "lorem ipsum" will appear. – Ivan Mitroshyn May 19 '16 at 14:19
  • I don't know what that "other stuff" is, but maybe this will help you http://stackoverflow.com/a/5999146/6156035 – Angusiasty May 20 '16 at 07:04
  • Not helped. I wrote an example of "other stuff" in the previous comment. – Ivan Mitroshyn May 26 '16 at 09:29