Groups
Groups
Sign in
Groups
Groups
CasperJS
Conversations
About
Send feedback
Help
using xpath document.querySelector
9,339 views
Skip to first unread message
darker-fear
unread,
May 11, 2013, 10:17:25 AM
5/11/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to casp...@googlegroups.com
Hello
i don't know if someone tested xpath with querySelector, but it doesnt work with me
document.querySelector('plop').textContent = 'test'; // This one Work
document.querySelector(x('//*[@id="plop"]')).textContent = 'test'; // This one not Working
Any ideas ?
Nicolas Perriault
unread,
May 11, 2013, 12:25:57 PM
5/11/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to casp...@googlegroups.com
On Sat, May 11, 2013 at 4:17 PM, darker-fear <
hsn.e...@gmail.com
> wrote:
> Any ideas ?
document.querySelector{All}() is a browser native function which
doesn't support XPath, only CSS3 selectors.
Use __utils__.getElement{s}ByXpath()
http://docs.casperjs.org/en/latest/modules/clientutils.html#getelementbyxpath
++
--
Nicolas Perriault
https://nicolas.perriault.net/
Phone: +33 (0) 660 92 08 67
darker-fear
unread,
May 12, 2013, 5:32:25 PM
5/12/13
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to casp...@googlegroups.com
Thanks Nicolas
__utils__.getElement{s}ByXpath() worked like a charm for me.
Regards
Reply all
Reply to author
Forward
0 new messages