Share
Go down
wayneb64
Posts : 2
Join date : 2010-09-22

XPath issue in seleniumRC

on Fri Oct 08, 2010 5:40 am
I am having problems finding an element to click that I can click/find just fine in Selenium IDE.

For example, selenium.getXpathCount("//img[@title]")) returns 12,
but selenium.getXpathCount("//img[@title='Generic Fields']") returns zero,
even though the IDE gave me that XPath, and it also works fine in XPathChecker.
avatar
Advisor
------------------------
------------------------
Posts : 383
Join date : 2009-07-30
Location : India
http://seleniumforum.forumotion.net

Re: XPath issue in seleniumRC

on Sat Dec 11, 2010 8:57 pm
try to generate new xpath from xpather addon and use that one. may be that will work.
tulasi26ram
Posts : 1
Join date : 2010-11-06

Re: XPath issue in seleniumRC

on Tue Dec 14, 2010 10:43 pm
try to add-ons "Xpath checker" and "Firebug" in firefox and restart firefox. Now open the site which you want to test. You can find a Bug symbol on the right-corner of the status bar of the page.

1. suppose if you want to find the xpath of an element or list of elements. Do the following process.

1. Right click on the link for which you want to find the xpath. Go to "Inspect Element".
2. This will automatically opens your Firebug below the page you are viewing and focuses you mouse at the required position.
3. Again right click at the focused position, and go to copy xpath.
4. Now go back to the link for which you want to find the xpath.
5. Right click on the link again. select view xpath. A pop up window for xpath checker opens.
6. There you paste the copied xpath from where you copied the xpath.
7. In xpath checker you will fill like html/div[1]//div//div/ul/li , say for this time.
8. Now u have to write inside the div tag starting from the last in the xpath which you have seen in the xpath checker as

syntax : //div[@class='classname']//div[@class='classname']/ul/li

eg: //div[@class='textimage parbase']//div[@class='parbase']/li/a


If you still facing problem u can reach me at my skype id: tulasi26ram

or write a mail to tulasi26ram@yahoo.co.in with subject "Doubt in selenium"


Sponsored content

Re: XPath issue in seleniumRC

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