Validating xpath in chrome gives syntax error

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

Validating xpath in chrome gives syntax error

Vinod Ujjal Boruah
I was trying to validate the xpath of the search box of weikipedia as shown in the video tutorial
$x{"/input[@id='searchInput']"}
SyntaxError: Unexpected token {
Please rectify my syntax
Reply | Threaded
Open this post in threaded view
|

Re: Validating xpath in chrome gives syntax error

bswjitsamal
Please try

$x{"//input[@id='searchInput']"}

you need to put "//" in-front of the code since you are using xpath. this is the basic syntax
Reply | Threaded
Open this post in threaded view
|

Re: Validating xpath in chrome gives syntax error

vinodkumar.np
Hi,

Still facing with same error as "Unexpected Token {". Can anyone help please. Attached screenshot for reference.
Reply | Threaded
Open this post in threaded view
|

Re: Validating xpath in chrome gives syntax error

Abhishek
In reply to this post by bswjitsamal
I believe it is a simple syntax error.
Replace { } with ( ) in your xpath.


On Mon, Mar 31, 2014 at 5:45 PM, bswjitsamal [via Manual and Automated Testing] <[hidden email]> wrote:
Please try

$x{"//input[@id='searchInput']"}

you need to put "//" in-front of the code since you are using xpath. this is the basic syntax


If you reply to this email, your message will be added to the discussion below:
http://manual-and-automated-testing.1070.x6.nabble.com/Validating-xpath-in-chrome-gives-syntax-error-tp5002138p5002154.html
To start a new topic under Training Session Questions, email [hidden email]
To unsubscribe from Training Session Questions, click here.
NAML