Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» FlexMonkium Download Not available under Gorillalogic site
Thu Dec 08, 2016 5:40 pm by bhanu.praveen

» Selenium Script issue
Tue Dec 06, 2016 9:48 pm by njain213

» Difference between QTP, Selenium and Silk test
Tue Dec 06, 2016 7:58 pm by jessicacyrus1

» Where does selenium script pick browser from
Tue Dec 06, 2016 1:52 pm by janbaskt

» Safari throws an HTTP ERROR: 404
Tue Dec 06, 2016 1:51 pm by janbaskt

» Access Denied Error in Selenium RC
Tue Dec 06, 2016 1:51 pm by janbaskt

» Automating Flex application through selenium webdriver
Fri Dec 02, 2016 2:06 pm by abhinay.krs

» Starting with Selenium, what is Selenium?
Mon Nov 28, 2016 4:00 pm by Foma

» Getting started with Selenium
Mon Nov 28, 2016 3:23 pm by Rebbelx

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

switchTo().frame(frameElement);

View previous topic View next topic Go down

switchTo().frame(frameElement);

Post by imex on Sat Dec 10, 2011 12:37 am

Hi,

I'm working with selenium v2.0 and IE v8. I know about some issues in combination with IE v8, and one more of these is my own Smile

How can I switch into an inner frame to access and HTML element, when I have the following HTML output?



...


....
Text









My target is to access to the link "

imex

Posts : 3
Join date : 2011-12-10

Back to top Go down

Re: switchTo().frame(frameElement);

Post by imex on Sat Dec 10, 2011 12:41 am

Sorry, have forgot that HTML tags are not shown:

Here my HTML code again:

iframe name="contentAreaFrame" id="contentAreaFrame" ....
html
head.../head
body
div id="div1"
iframe name="isolatedWorkArea" id="isolatedWorkArea" ...
div id="x100"
....
a href="..." id="mylink_id"Text/a
/div
/iframe
/div
/body
/html
/iframe

And target element to access is: a href='....'".

I'm working with Java v6 (JEE).

Please urgent help. Mandy thanks.

Cengiz

imex

Posts : 3
Join date : 2011-12-10

Back to top Go down

Re: switchTo().frame(frameElement);

Post by gaveyom on Mon Dec 12, 2011 11:24 am

Hi imex,

below is the way to access the links from frame
u can get the elements inside the frame with the help of name/ id/ index(0/ 1/ 2)


List array_List = driver.switchTo().frame("frameId/ frameName").findElements(By.xpath("//a"));

or

List array_List = driver.switchTo().frame(0).findElements(By.xpath("//a"));
int cnt=0;
for (WebElement option : array_List) {

Array[cnt++] = option.getAttribute("id");
or
Array[cnt++] = option.getText();

}

gaveyom
Amateur
Amateur

Posts : 38
Join date : 2011-07-13

Back to top Go down

Switch to frame error

Post by imex on Mon Dec 12, 2011 5:05 pm

Hi Gaveyom,

thanks for reply. But when I try to access to an element within and iframe (which also is an element of its parent iframe), I got the error message:

org.openqa.selenium.NoSuchElementException: Unable to find element with xpath == //button[contains(@id,'aaaaEFPDBOMAACHH.Draft_Step1.CancelButton')] (WARNING: ...)


imex

Posts : 3
Join date : 2011-12-10

Back to top Go down

Re: switchTo().frame(frameElement);

Post by gaveyom on Mon Dec 12, 2011 7:46 pm

Hi imex,

if possible can u provide me the URL of ur application, so that i can check it

gaveyom
Amateur
Amateur

Posts : 38
Join date : 2011-07-13

Back to top Go down

Re: switchTo().frame(frameElement);

Post by Sponsored content Today at 3:52 pm


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