Mahdi
Mahdi

Reputation: 1035

Extract XPath and Run it in google chrome

There is dropdown list in a webpage, when I try to test the xpath from google chrome console with the following code:

$x("//*[@id="searchResultsList"]/li[2]/div/div/div/pagination-component/div[1]/div[4]/span[2]/select/option[4]")

I see the following error

Uncaught SyntaxError: missing ) after argument list

But I think my syntax is correct

Upvotes: 1

Views: 327

Answers (1)

Ed Bangga
Ed Bangga

Reputation: 13016

try this, your strings are not correctly formatted.

$x("//*[@id='searchResultsList']/li[2]/div/div/div/pagination-component/div[1]/div[4]/span[2]/select/option[4]")

Upvotes: 1

Related Questions