Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» Selenium WebDriver Integration
Tue Nov 21, 2017 1:06 pm by azharuddin

» how to connect DB in selenium webriver
Fri Oct 06, 2017 4:09 pm by anbarasi

» How find any text in browser screen and click on it?
Thu Oct 05, 2017 2:02 pm by sandeepkommineni

» Selenium Webdriver
Tue Oct 03, 2017 1:35 pm by PiyushBiswas

» GRID setup tutorial.
Wed Sep 27, 2017 4:29 pm by johnyapp

» Drag & Drop Between Windows Using Selenium Driver
Wed Sep 27, 2017 2:10 pm by 26rondel

» Check if window is closed / verify input
Sat Sep 23, 2017 10:21 pm by brainstir

» How to work on pages with AJAX in selenium?
Mon Sep 18, 2017 6:08 pm by azharuddin

» pause test until user press a key like F2
Wed Aug 09, 2017 11:10 pm by djnforce

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Finding elements in a page with nested frames

View previous topic View next topic Go down

Finding elements in a page with nested frames

Post by tukarthik on Wed Dec 05, 2012 1:28 pm

Hi,
I have a page with many nested frames. I am trying do findelement for an elemnt lying inside an inner frame. But, it always throws me nosuchelementfoundexception. I also added the implicitwait to 30 seconds. What I am guessing is, the implicit wait just waits for the main page to load and not all the contained frames. Is there is any way to get all the nested frames to get loaded(fully) first before moving on?

tukarthik

Posts : 1
Join date : 2012-12-05

Back to top Go down

Re: Finding elements in a page with nested frames

Post by tarun3kumar on Wed Dec 05, 2012 5:03 pm

You first need to switch to frame using switchTo API

_________________
Thanks
Tarun K
Free Selenium Training

tarun3kumar
Master
Master

Posts : 186
Join date : 2012-02-14

http://seleniumtests.com

Back to top Go down

Re: Finding elements in a page with nested frames

Post by gaveyom on Mon Dec 10, 2012 7:51 pm

Hi Karthik,

List aaLinks = driver.switchTo().frame(0).findElements(By.xpath("//div[@id="leftPanel"]//a"));

or

List aaLinks = driver.switchTo().frame("framename").findElements(By.xpath("//div[@id="leftPanel"]//a"));

this is the way u will get/ access the elements exist in frame

u can mention frame(index) --- Example: frame(0)
or
u can mention frame("name") --- Example: frame("login")

hope this will helpful

gaveyom
Amateur
Amateur

Posts : 38
Join date : 2011-07-13

Back to top Go down

Re: Finding elements in a page with nested frames

Post by Sponsored content


Sponsored content


Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum