Xpath not clicking on button even though it is visible

512 views
Skip to first unread message

robocop

unread,
Nov 10, 2014, 9:32:30 AM11/10/14
to seleniu...@googlegroups.com
Hi,

I am trying to click on an options but cannot. When I run the script below it picks the correct link but it still will not click on it. The link are visible only when the previous one is clicked and so on, It works fine up to the last menu_1033 where it does not find ti and instead clicks on
another link unrelated to this one. I have tried everything to get the option and I am wondering if this is an issue with webdriver 2.44 or something/ 



 driver.findElement(By.id("menu_1028")).click();
                    driver.findElement(By.id("menu_1029")).click();
                    driver.findElement(By.id("menu_1030")).click();
                    driver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);
                    String test1=driver.findElement(By.id("menu_1033")).getText();
                    System.out.println(test1);


If you need any other info let me know

thanks

DarthOpto

unread,
Nov 10, 2014, 3:28:10 PM11/10/14
to seleniu...@googlegroups.com
I wonder if placing a wait in between your clicks would help?

Richard Kearney

unread,
Nov 11, 2014, 3:07:22 AM11/11/14
to Selenium Users
Hi,

If only this was so easy, tried this but to no avail

thaniks

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/FOSuOiHVICI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.
To post to this group, send email to seleniu...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/130ba6cb-1cc5-495c-87d6-c811e8e327a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

robocop

unread,
Nov 11, 2014, 3:08:10 AM11/11/14
to seleniu...@googlegroups.com
Hi

Tried this and to no avail. thanks for your suggestion though

PeterJeffreyGale

unread,
Nov 11, 2014, 4:12:26 AM11/11/14
to seleniu...@googlegroups.com
We could do with a public copy of the webpage to look at if you really want help.

If you suspect it is a problem with v2.44, have you tried with earlier versions of webdriver for the same functionality and had it working with exactly the same code tp prove that it ONLY fails with v2.44?

robocop

unread,
Nov 11, 2014, 6:32:54 AM11/11/14
to seleniu...@googlegroups.com
Hi,

I have tried in a couple of previous version and still no joy. I would really appreicate if you could help me on this so I have attached the complete webpage, fingers crossed that you can assist with this


thanks
Richard
SourceReport.html

robocop

unread,
Nov 11, 2014, 6:35:27 AM11/11/14
to seleniu...@googlegroups.com
Hi,

I would also like to point out that it click on the report overtime/reason instead of absence/trend even though the xpath is clearly correct and should click on the trend report

thanks

PeterJeffreyGale

unread,
Nov 11, 2014, 7:11:22 AM11/11/14
to seleniu...@googlegroups.com
Your attached html just shows a set of static links.

We'd need to see working it exaclty as you describe , so that we can click on one element and others get enabled.

Sharath Konda

unread,
Nov 11, 2014, 7:15:08 AM11/11/14
to seleniu...@googlegroups.com
may be instead of xpath, use either id or css or name or linkText.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.

Richard Kearney

unread,
Nov 11, 2014, 7:50:44 AM11/11/14
to Selenium Users
Hi,

I will have to give you real time access to something on the cloud. I will ask one of the guys here to  assits in this.

Thanks

On Tue, Nov 11, 2014 at 12:11 PM, PeterJeffreyGale <peterjef...@hotmail.co.uk> wrote:
Your attached html just shows a set of static links.

We'd need to see working it exaclty as you describe , so that we can click on one element and others get enabled.

--
You received this message because you are subscribed to a topic in the Google Groups "Selenium Users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/selenium-users/FOSuOiHVICI/unsubscribe.
To unsubscribe from this group and all its topics, send an email to selenium-user...@googlegroups.com.

To post to this group, send email to seleniu...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages