driver.manage().timeouts().pageLoadTimeout(2, TimeUnit.MINUTES);
but browser does not wait 2 minutes
Cheers
Synchronization :-
Thread.sleep(9000);
selenium.waitForPageToLoad("9000");
WebDriverWaitwait=newWebDriverWait(driver,9);
wait.until(ExpectedConditions.elementToBeClickable(By.id("Element-id")));
driver.manage().timeouts().implicitlyWait(9,TimeUnit.SECONDS);
That's because it's a timeout and not a wait.Just use a Thread.Sleep call if you want a fixed wait.
--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/01ee30d3-8c9b-44a6-a41d-a39382b3f656%40googlegroups.com.
if(flash.equals("Sorry, failed to invite the user.")){
do{
i++;
driver.findElement(By.xpath(".//*[@id='designation_profile_attributes_email']")).clear();
driver.findElement(By.xpath(".//*[@id='designation_profile_attributes_email']")).sendKeys("hiveagetest+"+i+"@gmail.com");
driver.findElement(By.xpath(".//*[@id='workspace']/div/div/div[1]/header/div[1]/button")).click();
flash = driver.findElement(By.xpath(".//*[@id='flash']")).getText().toString();
//wait.until(ExpectedConditions.invisibilityOfElementWithText(By.xpath(".//*[@id='flash']"), "Saving..."));
System.out.println(flash);
}while(flash.equals("User has been invited."));
//flash = driver.findElement(By.xpath(".//*[@id='flash']")).getText().toString();
}
i want to wait until disappear "Saving..." flash message and appear "Sorry, failed to invite the user." or "User has been invited.".
i could not find any solution from selenium.