Reputation: 19
I'am trying to automate http://rose.99ats.com/careers.aspx
After clicking on "signup", I couldn't find the element Popup. I used getWindowHandle()
, also used driver.swithchto()
, but getting error. I can't find element.
Upvotes: 0
Views: 1104
Reputation: 32855
Because it's in a new iframe
, you need to use driver.switchTo().frame()
.
Here is a detailed answer on using switchTo()
, in which you can't use name/id in your case, index should generally be avoided, so you may try locate the iframe element by css selector or xpath first, then switch to this WebElement
.
WebElement popup = driver.findElement(By.cssSelector("iframe[src^='CareerSignUp.aspx']"));
driver.switchTo().frame(popup);
// or by index: driver.switchTo().frame(0);
Upvotes: 1