Problem with Selenium RC, can't find objects in Junit.
Page 1 of 1 • Share •
Problem with Selenium RC, can't find objects in Junit.
Hi!
I have a problem with running Junit tests with selenium RC. When running the tests on Internet Explorer, selenium can't find the objects (Buttons etc). If I try with Xpath Browser the path is found but when I am running the tests Selenium complain that the object is not found:
Example:
selenium.click("xpath=//a[contains(@href,'submit')][text()='Done']");
Gives
ERROR: Element xpath=//a[contains(@href,'submit')][text()='Done'] not found
I have tried with different xpath but can't get it to work (and I am quite sure that the xpath is correct). Have I missed something?
Bande
I have a problem with running Junit tests with selenium RC. When running the tests on Internet Explorer, selenium can't find the objects (Buttons etc). If I try with Xpath Browser the path is found but when I am running the tests Selenium complain that the object is not found:
Example:
selenium.click("xpath=//a[contains(@href,'submit')][text()='Done']");
Gives
ERROR: Element xpath=//a[contains(@href,'submit')][text()='Done'] not found
I have tried with different xpath but can't get it to work (and I am quite sure that the xpath is correct). Have I missed something?
Bande
Bande- Posts: 1
Join date: 2010-03-24
Re: Problem with Selenium RC, can't find objects in Junit.
hi,
Try to use the following things and lets will it work or not:
1. If your xpath is correct, remove "xpath=".
2. If only one submit button/link present on the page, try to use "link=submit" as locator instead of xpath
3. Or try this "selenium.click("xpath=//a[contains(@href,'submit')]");"
If none of them work, give the URL of the page, I will give you a xpath which works. Hope this will help you.
Best of luck.
Bye
Try to use the following things and lets will it work or not:
1. If your xpath is correct, remove "xpath=".
2. If only one submit button/link present on the page, try to use "link=submit" as locator instead of xpath
3. Or try this "selenium.click("xpath=//a[contains(@href,'submit')]");"
If none of them work, give the URL of the page, I will give you a xpath which works. Hope this will help you.
Best of luck.
Bye
Similar topics» Find out what Is Great About Dell Desktops.
» nokia 1202 white display problem
» TX-NR509 - Problem connecting WII via HDMI converter - audio ok but no video
» Problem with Selenium RC, can't find objects in Junit.
» how to generate execution reports using seleniumRC+Junit+
» nokia 1202 white display problem
» TX-NR509 - Problem connecting WII via HDMI converter - audio ok but no video
» Problem with Selenium RC, can't find objects in Junit.
» how to generate execution reports using seleniumRC+Junit+
Page 1 of 1
Permissions in this forum:
You cannot reply to topics in this forum

» sample webdriver code for php users
» which standalone server to use
» Dynamic Drop Down Selection
» It is possible to find list of all URL's exist in any web page in selenium ide
» It is possible to compare 2 same images in selenium IDE.
» how to compare 2 ULR's which is exist in same web page (View page source).
» Web Driver: Unable to click a link present inside the frame of a frameset
» Help me to get dynamicaly loaded options of dropdown in Selenium RC -Junit test case