- imex
- Posts : 3
Join date : 2011-12-10
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
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 "
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
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
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
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
- gaveyomAmateur
- Posts : 38
Join date : 2011-07-13
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();
}
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
or
List
int cnt=0;
for (WebElement option : array_List) {
Array[cnt++] = option.getAttribute("id");
or
Array[cnt++] = option.getText();
}
- imex
- Posts : 3
Join date : 2011-12-10
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:
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: ...)
- gaveyomAmateur
- Posts : 38
Join date : 2011-07-13
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
if possible can u provide me the URL of ur application, so that i can check it
Permissions in this forum:
You cannot reply to topics in this forum
|
|