Search
 
 

Display results as :
 


Rechercher Advanced Search

Latest topics
» why do i get this error
Yesterday at 9:43 pm by anbarasi

» wait property
Yesterday at 12:50 pm by anbarasi

» What is the use of Selenium Remote Control
Fri Apr 21, 2017 7:24 pm by azharuddin

» How can I fix it? TCP PORT Exhaustion
Wed Apr 19, 2017 3:29 pm by JohnSnow

» Difference between QTP, Selenium and Silk test
Wed Apr 19, 2017 2:30 pm by Basilios Will

» Locator for google document
Tue Apr 18, 2017 10:01 pm by SergeyK

» I encountered a mistake: Couldn't register this node
Sat Apr 15, 2017 9:06 pm by skyshine725

» Current version tutorial for just creating a browser instance - Visual Studio
Fri Apr 14, 2017 2:47 am by KilpAr

» cant able to select drop down otions
Thu Apr 13, 2017 6:08 pm by anbarasi

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


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