0

I have a website where a html tag is nested inside like below. Questions:

  1. How to search for element in frameBody using selenium?
  2. How to wait for element in frameBody successful loaded?

Please help. Thanks. Please get the application source code from this link.

enter image description here

nicholas
  • 2,581
  • 14
  • 66
  • 104
  • I tried with this driver.switchTo().frame("frameBody"); but it causes No frame element found by name or id frameBody. – nicholas Aug 13 '18 at 05:44

1 Answers1

1

The <frame> with id = frameBody is nested in another <iframe>, you need to switch to it first

WebElement iframe = driver.findElement(By.cssSelector("#tabFrames > iframe:nth-child(1)"));
driver.switchTo().frame(iframe);
driver.switchTo().frame("frameBody");
Guy
  • 46,488
  • 10
  • 44
  • 88