0

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.

Yi Zeng
  • 32,020
  • 13
  • 97
  • 125
DANY MOON
  • 19
  • 8

1 Answers1

1

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);
Community
  • 1
  • 1
Yi Zeng
  • 32,020
  • 13
  • 97
  • 125