Selenium Forum: Functional And Regression Testing Tool.
Would you like to react to this message? Create an account in a few clicks or log in to continue.
Search
Display results as :
Advanced Search
Latest topics
AEM Training | Free Online DemoWed Apr 21, 2021 5:45 pmazharuddin
c# PageFactory - issue initializing elementsFri Nov 01, 2019 8:40 pmthegoatboy
Selenium making automatic connection to random urlsMon Jul 08, 2019 12:58 pmrepairtechsolutions1
How can we design the custom framework in Selenium RCMon Jun 24, 2019 2:26 pmrandybonnettes
What are the new features in Selenium 3.0Tue Jun 18, 2019 5:37 pmpappyvicky
What are you using Selenium for? Fri Apr 12, 2019 3:52 amzhl
LIMITATIONS OF SELENIUMWed Apr 10, 2019 11:23 amswara
Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Go down
avatar
imex
Posts : 3
Join date : 2011-12-10

switchTo().frame(frameElement); Empty switchTo().frame(frameElement);

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 "
avatar
imex
Posts : 3
Join date : 2011-12-10

switchTo().frame(frameElement); Empty Re: switchTo().frame(frameElement);

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
avatar
gaveyom
Amateur
Amateur
Posts : 38
Join date : 2011-07-13

switchTo().frame(frameElement); Empty Re: switchTo().frame(frameElement);

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();

}
avatar
imex
Posts : 3
Join date : 2011-12-10

switchTo().frame(frameElement); Empty Switch to frame error

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: ...)

avatar
gaveyom
Amateur
Amateur
Posts : 38
Join date : 2011-07-13

switchTo().frame(frameElement); Empty Re: switchTo().frame(frameElement);

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
Sponsored content

switchTo().frame(frameElement); Empty Re: switchTo().frame(frameElement);

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