How to click a link present inside the frame of a frameset
+3
anemuday
Edalincam55
shweta.bet
7 posters
- Moskva
- Posts : 4
Join date : 2014-12-25
How to click a link present inside the frame of a frameset
Thu Dec 25, 2014 10:16 pm
Here is what I am trying to do to to click a link present inside the frame of a frameset..
firefox.FindElement(By.XPath("//Tag[@name='frame']"));
firefox.SwitchTo().Frame(firefox.FindElement(By.Id("101")));
IWebElement frame = firefox.FindElement(By.Name("Name"));
All of this command are unsuccessfull. They could not locate frame. I have question whether selenium 2.44 supports frames?
Maybe some example where it is working? Maybe I am missing something?
firefox.FindElement(By.XPath("//Tag[@name='frame']"));
firefox.SwitchTo().Frame(firefox.FindElement(By.Id("101")));
IWebElement frame = firefox.FindElement(By.Name("Name"));
All of this command are unsuccessfull. They could not locate frame. I have question whether selenium 2.44 supports frames?
Maybe some example where it is working? Maybe I am missing something?
- shweta.bet
- Posts : 7
Join date : 2014-11-14
Age : 42
Re: How to click a link present inside the frame of a frameset
Fri Dec 26, 2014 1:46 pm
Just try use id as an argument to switchTo statement,
such as ,
such as ,
- Code:
driver.switchTo().frame("frameID");
- Edalincam55
- Posts : 4
Join date : 2015-01-02
Age : 36
Location : PK
Re: How to click a link present inside the frame of a frameset
Fri Jan 02, 2015 11:31 am
After reading your post, I am assuming your experience, so please, would you mind to tell me, this is right way to creat frames??
To use frames on a page we use
To use frames on a page we use
- anemudayActive particpant
- Posts : 11
Join date : 2012-10-11
Re: How to click a link present inside the frame of a frameset
Wed Jan 07, 2015 11:01 pm
Hi,
The first thing you should do with frames is, you need to switch to the frame.
This can be done on below ways.
driver.switchTo().frame("Index")
driver.switchTo().frame("name")
driver.switchTo().frame("Frame as webelement").
Once you are done with your operation on your frame, you need to come out of the focus by using
driver.switchTo().defaultContent()
For detailed explanation please watch the below video:
Let me know if you still see the problem.
Thanks,
Uday
The first thing you should do with frames is, you need to switch to the frame.
This can be done on below ways.
driver.switchTo().frame("Index")
driver.switchTo().frame("name")
driver.switchTo().frame("Frame as webelement").
Once you are done with your operation on your frame, you need to come out of the focus by using
driver.switchTo().defaultContent()
For detailed explanation please watch the below video:
Let me know if you still see the problem.
Thanks,
Uday
- nabhanya.varmaActive particpant
- Posts : 13
Join date : 2014-03-02
Re: How to click a link present inside the frame of a frameset
Sun Jan 25, 2015 8:41 pm
You should have a look on WebDriverWait class. We have a method to wait for a frame and then switch
And then you should wait for the element to be visible to perform any action.
Check the below link to work with frames using selenium webdriver
http://seleniumeasy.com/selenium-tutorials/how-to-work-with-iframes-in-selenium-webdriver
- Code:
WebDriver frame = wait.until(ExpectedConditions.frameToBeAvailableAndSwitchToIt("frame"))
And then you should wait for the element to be visible to perform any action.
- Code:
WebDriverWait wait = new WebDriverWait(driver, 3000);
wait.until(ExpectedConditions.visibilityOfElementLocated((By
.name("element"))));
Check the below link to work with frames using selenium webdriver
http://seleniumeasy.com/selenium-tutorials/how-to-work-with-iframes-in-selenium-webdriver
- Moskva
- Posts : 4
Join date : 2014-12-25
Re: How to click a link present inside the frame of a frameset
Wed Feb 04, 2015 12:41 am
I have code like this:
testedbrowser.SwitchTo().DefaultContent();
Thread.Sleep(5000);
// IWebElement Frameneeded = testedbrowser.FindElement(By.Name("SideFrame"));
testedbrowser.SwitchTo().Frame("SideFrame");
it works fine with firefox but no way with Chrome and with IE 11. That is and that was the problem for me. I have windows 8. MS VS 2008.
testedbrowser.SwitchTo().DefaultContent();
Thread.Sleep(5000);
// IWebElement Frameneeded = testedbrowser.FindElement(By.Name("SideFrame"));
testedbrowser.SwitchTo().Frame("SideFrame");
it works fine with firefox but no way with Chrome and with IE 11. That is and that was the problem for me. I have windows 8. MS VS 2008.
- hanaij
- Posts : 1
Join date : 2015-02-12
Re: How to click a link present inside the frame of a frameset
Thu Feb 12, 2015 11:18 am
I'm having trouble in locating an element inside the iframe, once I perform mouse over there is a tooltip showing the time but there's no id, name, etc to locate the element.
Here below the HTML tag inside the iframe id = "scheduler"
div onmouseup="fireScheduleTimeClicked(this, event, 'schedulerForm', 'schedulerForm:schedCalendar');" style="position: relative; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 0;" class="column" id="schedulerForm:schedCalendar_body_20150213">
Here below the HTML tag inside the iframe id = "scheduler"
div onmouseup="fireScheduleTimeClicked(this, event, 'schedulerForm', 'schedulerForm:schedCalendar');" style="position: relative; top: 0px; left: 0px; width: 100%; height: 100%; z-index: 0;" class="column" id="schedulerForm:schedCalendar_body_20150213">
Hoping anyone can help me.
- AgoBalanAmateur
- Posts : 36
Join date : 2015-02-23
Re: How to click a link present inside the frame of a frameset
Mon Feb 23, 2015 3:45 pm
Actually what is your exact problem.. switch to iframe or finsing eklement in Iframe?
Permissions in this forum:
You cannot reply to topics in this forum