DEV Community

Discussion on: What was your win this week?

Collapse
 
tsasser05 profile image
tsasser05

WIN: Successfully forced Selenium Java to login with Microsoft Online!

The problem was that the dialog box is reused for the password. However, the original button goes away and the Selenium web driver loses track. This is called a "staleness" error and Selenium will report it as such. The button xpath is identical. What you have to do is loop, causing the driver to keep looking at that spot. It then notices the change and tracks it. This is a rather poor explanation, but explains the concepts involved.