Share
Go down
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Clicking a link not working

on 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.
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Re: Clicking a link not working

on 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.
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Re: Clicking a link not working

on 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.
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Re: Clicking a link not working

on 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().


Last edited by faramka on Wed Jan 04, 2012 3:49 pm; edited 1 time in total (Reason for editing : mistake in method name)
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Re: Clicking a link not working

on 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 pale .
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Re: Clicking a link not working

on Wed Jan 04, 2012 3:50 pm
Read THIS, maybe it could help.
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Re: Clicking a link not working

on Wed Jan 04, 2012 3:52 pm
Sorry. You could have forgotten to paste the link/content.
faramka
Professional
Professional
Posts : 143
Join date : 2011-09-15
Location : Poland

Re: Clicking a link not working

on 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?
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Re: Clicking a link not working

on 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.
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Re: Clicking a link not working

on 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.
Bhuvaneswari
Regular Participant
Regular Participant
Posts : 30
Join date : 2011-09-30
Location : India

Re: Clicking a link not working

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

Re: Clicking a link not working

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