- BhuvaneswariRegular Participant
- Posts : 30
Join date : 2011-09-30
Location : India
Clicking a link not working
Tue Jan 03, 2012 6:33 pm
After mouse over, a drop down appears with few menu links. Upon trying to click the link, failing. Please help me.
Code goes here,
selenium.mouseOver("id=NavigationMenuItem_6");
selenium.waitForPageToLoad("20000");
selenium.click("link=MenuItem_1"); //This line not working
selenium.waitForPageToLoad("60000");
Times out after 20 seconds. Could some one throw some light please.
Code goes here,
selenium.mouseOver("id=NavigationMenuItem_6");
selenium.waitForPageToLoad("20000");
selenium.click("link=MenuItem_1"); //This line not working
selenium.waitForPageToLoad("60000");
Times out after 20 seconds. Could some one throw some light please.
- faramkaProfessional
- Posts : 143
Join date : 2011-09-15
Location : Poland
Re: Clicking a link not working
Tue Jan 03, 2012 7:06 pm
Before this line of code which is not working try check if the link really exists.
To do this, you can use an assertion or isElementPresent() command included in if statement.
To do this, you can use an assertion or isElementPresent() command included in if statement.
- BhuvaneswariRegular Participant
- Posts : 30
Join date : 2011-09-30
Location : India
Re: Clicking a link not working
Wed Jan 04, 2012 12:59 pm
one mistake. Gave the Javascript id("link=MenuItem_1") for the link instead of the text("Menu") given for the link. After changing this it worked. Thanks for your reply any how.
Now I have another issue.
On clicking a icon, a new window(XWT) opens and I am not able to execute the commands on the new window. It fails. The script works till it opens the new window. If trying to type something, or click on any link on the new window, not working. Please help.
Now I have another issue.
On clicking a icon, a new window(XWT) opens and I am not able to execute the commands on the new window. It fails. The script works till it opens the new window. If trying to type something, or click on any link on the new window, not working. Please help.
- faramkaProfessional
- Posts : 143
Join date : 2011-09-15
Location : Poland
Re: Clicking a link not working
Wed Jan 04, 2012 2:22 pm
Have you tried choose active window? Use selectWindow(id) and the id you can get by choosing one of the results of getAllWindowIds().
- BhuvaneswariRegular Participant
- Posts : 30
Join date : 2011-09-30
Location : India
Re: Clicking a link not working
Wed Jan 04, 2012 3:41 pm
Thanks.
I tried like below,
After opening the new windows, inserted a line for 'getAllWindowIds()'. The array resulted 'undefined' for both new windows. Any thoughts please .
I tried like below,
After opening the new windows, inserted a line for 'getAllWindowIds()'. The array resulted 'undefined' for both new windows. Any thoughts please .
- faramkaProfessional
- Posts : 143
Join date : 2011-09-15
Location : Poland
Re: Clicking a link not working
Wed Jan 04, 2012 3:50 pm
Read THIS, maybe it could help.
- BhuvaneswariRegular Participant
- Posts : 30
Join date : 2011-09-30
Location : India
Re: Clicking a link not working
Wed Jan 04, 2012 3:52 pm
Sorry. You could have forgotten to paste the link/content.
- faramkaProfessional
- Posts : 143
Join date : 2011-09-15
Location : Poland
Re: Clicking a link not working
Wed Jan 04, 2012 4:32 pm
There is a link under word 'THIS'. You can click at it when you are logged in, can't you?
- BhuvaneswariRegular Participant
- Posts : 30
Join date : 2011-09-30
Location : India
Re: Clicking a link not working
Wed Jan 04, 2012 5:35 pm
Yeah, now I could open the link. But the selectWindow(WindowID) [selectWindow(name=windowID) or selectWindow(windowID)] throws the Error: Window does not exist.
- BhuvaneswariRegular Participant
- Posts : 30
Join date : 2011-09-30
Location : India
Re: Clicking a link not working
Wed Jan 04, 2012 5:37 pm
The following defect has not been resolved it seems.
SEL-703
Also no workarounds I get. Would be great if I get this resolved.
SEL-703
Also no workarounds I get. Would be great if I get this resolved.
- BhuvaneswariRegular Participant
- Posts : 30
Join date : 2011-09-30
Location : India
Re: Clicking a link not working
Thu Jan 05, 2012 4:26 pm
Selenium IDE also fails to record the script for the actions performed on the new window. Any idea please.
- Clicking a link under a Axaz drop down
- Click not working on header link for drop down in footer
- how to select(get focus on) new window after clicking link in existing window
- Xpath for buttons not working in IE but working perfectly in firefox
- my Script working fine in Firefox but not working in IE7 through Selenium RC
Permissions in this forum:
You cannot reply to topics in this forum