• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Junilu Lacar
  • Jeanne Boyarsky
  • Bear Bibeault
  • Knute Snortum
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
  • Piet Souris
  • Frits Walraven
  • Ganesh Patekar

Java recursive Fonction selenium

Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hello all , i am working on a java automatisation project using selenium web driver; this project should work on any application/any site (which is hard). i done a good job until now , but my Bigest problem since a month is this:
Since every web page can contains infinite number of frames : selenium needs to search in all the iframes of the page to find the element : here is an exemple of a web page to help you understand me :

Java recursive Fonction selenium-xxx-png
I need to create a java fonction like this:
List<WebElement> iframes = driver.findElements(By.tagName("iframe"));
for (WebElement iframe : iframes) {

How i do to search in all the iframes recursively ? you understand please guys? i need to enter all the frames and search my element there!!!
PLease try to help , even a little idea might keep me my job

Thank you all in advance
author & internet detective
Posts: 39538
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why do you need recursion? Can't you just have Selenium return all the elements with tag name "iframe"?
See ya later boys, I think I'm in love. Oh wait, she's just a tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!