New issue 3543 by ja...@cavanaugh.co.nz: Firefox webdriver
driver.getTitle() sometimes returns empty string
http://code.google.com/p/selenium/issues/detail?id=3543
What steps will reproduce the problem?
1. Create a test which navigates through pages, each time checking the page
title is set correctly. Or simply output the title on each page:
private void titleDebug(final String pageName) {
System.out.println(pageName + ":" + driver.getTitle());
System.out.println(pageName + "2:" + driver.getTitle());
}
2. Sometimes the output looks like:
...
changeDetailsConfirmed:
changeDetailsConfirmed2:change your contact details confirmed
...
Note that nothing has changed between calls (except maybe a few
milliseconds)
This doesn't happen everytime, can happen up to 1 in four attempts. It has
been reproduced on two separate PCs.
I haven't been able to reproduce using chrome or IE.
Selenium version: 2.19.0
OS: Windows 7
Browser: Firefox
Browser version: 10.0.2
This issue may be fixed for 2.21, please test
Same Issue using 2.20.0.
workaround - add a Thread.sleep(1500) before the call to driver.getTitle()