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
Moskva
Posts : 4
Join date : 2014-12-25

How to click a link present inside the frame of a frameset  Empty 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?
avatar
shweta.bet
Posts : 7
Join date : 2014-11-14
Age : 42

How to click a link present inside the frame of a frameset  Empty 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 ,

Code:
driver.switchTo().frame("frameID");
Edalincam55
Edalincam55
Posts : 4
Join date : 2015-01-02
Age : 36
Location : PK

How to click a link present inside the frame of a frameset  Empty 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 tag instead of tag. The tag defines how to divide the window into frames. The rows attribute of tag defines horizontal frames and cols attribute defines vertical frames. Each frame is indicated by tag and it defines which HTML document shall open into the frame.
avatar
anemuday
Active particpant
Active particpant
Posts : 11
Join date : 2012-10-11

How to click a link present inside the frame of a frameset  Empty 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
avatar
nabhanya.varma
Active particpant
Active particpant
Posts : 13
Join date : 2014-03-02

How to click a link present inside the frame of a frameset  Empty 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

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
avatar
Moskva
Posts : 4
Join date : 2014-12-25

How to click a link present inside the frame of a frameset  Empty 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. 
avatar
hanaij
Posts : 1
Join date : 2015-02-12

How to click a link present inside the frame of a frameset  Empty 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">

Hoping anyone can help me.
avatar
AgoBalan
Amateur
Amateur
Posts : 36
Join date : 2015-02-23

How to click a link present inside the frame of a frameset  Empty 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?
Sponsored content

How to click a link present inside the frame of a frameset  Empty Re: How to click a link present inside the frame of a frameset

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