Beefy Boxes and Bandwidth Generously Provided by pair Networks
Syntactic Confectionery Delight
 
PerlMonks  

Re: Xpath with Selenium

by Corion (Pope)
on Apr 28, 2016 at 12:28 UTC ( #1161761=note: print w/replies, xml ) Need Help??


in reply to Xpath with Selenium

Your question is not a Perl question but an XPath question.

Why can't you use the XPath queries that the Chrome Inspector gives you?

Replies are listed 'Best First'.
Re^2: Xpath with Selenium
by Chaoui05 (Scribe) on Apr 28, 2016 at 12:49 UTC
    Iam not sure that's a xpath question only. Cause iam using it in Selenium Perl test context. Rightly i used xpath from Chrome Inspector but iam not sure , i think it's different with :
    $elem = $driver->find_element('//input[1][@class="dx-texteditor-inpu +t"]')->send_keys("Live");
    Previous above works but not second as i told.

      You are using some XPath queries that are different from what you show that Chrome Inspector shows as the XPath queries.

      This is still an XPath question, but you are using the wrong XPath queries.

      I don't know how to help you further except to repeat that you need to use what Chrome Inspector shows you instead of making up random stuff.

        Of course i tried them. But i don't understand , i just retry them and it works now ! incredible ! I can't explain it i tried them before ! Perhaps server.. Anyway, Thanks Corion for your patience

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1161761]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2021-04-16 07:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found

    Notices?