XPath (XML Path Language) is a query language to address nof an XML document, designed to be used by both XSLT and XPointer. It also provides basic facilities for manipulation of strings, numbers and booleans. XPath uses a compact, non-XML syntax. XPath operates on the abstract, logical structure of ...

learn more… | top users | synonyms

2
votes
1answer
294 views

select random cursors on map using selenium ide

I'm using google map api in my site and I want to test the cursors on map using Selenium IDE. Now I use this code and it works fine: clickAt > xpath=(//map[@id='gmimap85']) but it tests only one ...
0
votes
1answer
95 views

In WebDriver I need to locate a text that's sibling to a tag

I am using WebDriver and I need to use XPath to get the text that appears after the <br></br> which is "59Min" from the below HTML. <div> 2Hrs, 56Min <br></br> 59Min ...
0
votes
1answer
288 views

How to click on Canvas element?

How do I click on a Canvas element by using Selenium Web Driver and Java? I have searched Google but didn't find what I needed. A marker/pin is on the Google map and I have to click on the ...
0
votes
3answers
108 views

how to use xpath for the following case

.//*[@id='colDiv_Apr282014']/div[5]/div[1] .//*[@id='colDiv_Apr282014']/div[9]/div[1] .//*[@id='colDiv_Apr282014']/div[11]/div[1] In the xpath above, you can see the value inside the first div-is ...
0
votes
1answer
91 views

Find text using Xpath with class (vb.net)

Hey guys ! This is on what I'm working on : Dim url As String = "http://brayket.byethost9.com/index.php?/shoutbox/" Dim web As New HtmlWeb() Dim doc As HtmlDocument = web.Load(url) Dim ...
0
votes
2answers
231 views

XPath not recognised in page object model in WebDriver [closed]

xpath not recognised in page object model in webdriver. @FindBy(xpath = "//td[contains (text(),'xxx')]") public WebElement topMenu; topMenu.click(); Error: Unable to locate element: ...
1
vote
1answer
140 views

Parsing xpath results in selenium ide

I'm trying to get a list of all the links that follow a certain rule ( their href is Downloads.aspx?<somestring> ) *Note: I'm using Selenium IDE, the Firefox plugin for this. In order to get ...
2
votes
4answers
1k views

Xpath captured using Selenium IDE is not running in Selenium RC for Links designed in XML

The below xpath which is captured for links in selenium IDE is not running in Selenium RC. The links are designed in XML. selenium.ClickAt("xpath=/html/body/div/div[2]/ul/li[3]", ""); ...
10
votes
3answers
980 views

Is jQuery faster than CSS/Xpath selectors for IE 8.0 in Selenium1?

I am planning to run my existing Selenium 1.x tests in IE 8.0. After checking few blogs and reading this, I tried to run my tests using jQuery locators with the method mentioned here. My tests uses ...
0
votes
4answers
2k views

absolute Xpath is not working for Gmail login page

I have tested the Gmail login page and was trying to verify the Sign in label in the Gmail login page above the user name field. I am using FirePath to generate the Xpath. When I inspect the element ...
1
vote
3answers
860 views

How to handle dynamically updated params in XPath queries in Selenium?

I am new to Selenium IDE. In my Web application, while playing back the recorded events, some internal id in XPath expression gets changed dynamically. E.g.: (//*[@id='edit_1_undefined']) in this ...
2
votes
2answers
2k views

How can I dynamically create an xpath string in Python for a webdriver xpath selector?

I am writing a Selenium Webdriver test using python2.7 to use xpath to select a link node set. For each link I need to change the href attribute using driver.execute_script to execute javascript. ...
1
vote
1answer
129 views

How to locate cursors randomly in a map?

There is a lot of cursors in the map. Every time you refresh the map you will get another different cursors with different IDs, o I can't use the IDs. I want to click at any cursor, a tooltip should ...
3
votes
1answer
2k views

How to get XPath of a list element generated by AJAX?

When I type a keyword ("Documents 1.xml") driver.findElement(By.id("documentSelect_enter")).sendKeys("Documents 1.xml"); in this field: <input id="documentSelect_enter" type="text" ...
8
votes
2answers
14k views

A way to match on text using CSS locators

So I use xpath locators and slowly converting to CSS. I haven't found a way to do an exact match based on text. For example converting //a[text()='Log Out']. I know you can do css=a:contains('Log ...
3
votes
2answers
1k views

Need help to frame locator for webdriver script

I have a button reach_analysis_button with id="x-auto-7". But directly using that i am not able to locate the element from webdriver. I tried ...
1
vote
2answers
184 views

Selenium Selenium.Core v1.1.4322 - XPath not working

I've got the following XPath expression's working in firebug, that returns the correct element(s): $x("(//input[@class='intervalInput timeInput'])") returns two elements. ...
1
vote
2answers
367 views

Not able to identify tab in Selenium

Below is code for tab - account.This is third tab. I have to go on tab but I am not able to identify <td class="buttons" nowrap="nowrap" title="Shows data of bank account" ...
1
vote
2answers
5k views

"Element is no longer attached to the DOM” StaleElementReferenceException when selecting HTML table row

I am using Selenium 2/WebDriver for automation. I have a table and am trying to select a row in it. When the test runs, I can see the row become highlighted as if it is clicked, but then immediately I ...
1
vote
5answers
4k views

Cannot locate button with changing ID in Selenium

I am working on a project where I have to locate a button. I have used XPath for that, but the button's id changes on every refresh, so I am facing a problem with that. Below is a HTML excerpt. Let me ...
4
votes
4answers
3k views

Selenium.click not working on some anchor elements

The application that am working on was recently revamped and as part of that a new JQuery calendar was introduced. I need to click on a link in the calendar to select the time and date. However, ...
2
votes
1answer
1k views

How to indicate an `&nbsp;` in xpath?

Say we have the following HTML code. What I want is to locate to the label element whose text is 'AgendaShowCapacity (1 remaining)' with XPath. <div id="pageContent"> <fieldset> ...
8
votes
2answers
16k views

WebDriver: find elements by text

I know that WebDriver can locate links through their text, using find_element_by_link_text or find_element_by_partial_link_text. Is it possible to locate any element (such as li, div, span, ...) by ...
6
votes
4answers
7k views

Which locator do you use with Selenium CSS or XPath?

I have heard that, when using Selenium, the CSS Locator has better performance than the XPath Locator. Which Locator do you use in your tests? Have you seen a great performance improvement when using ...
3
votes
3answers
10k views

Locating element by link text (anchor tag innerHTML) or xpath fails in Selenium 2.0 Webdriver

I'm using Selenium 2.0 web driver. My script keeps failing whenever I try locating something in my page. It throws an exception whether I locate the element by LinkText or by XPath. ...
2
votes
1answer
95 views

Differences in methods to select an element based on content in XPath

Selecting an anchor link with content, such as <a>test link</a>, I can see three different ways to do it using XPath: a[text()="test link"] a[.="test link"] a[contains(text(), "test ...