How to extract label value for the known XPath from web page ?

18 views
Skip to first unread message

mant...@gmail.com

unread,
Dec 25, 2017, 4:58:05 PM12/25/17
to greasemonkey-users
Hi.

just installed GM3.17 to replace GM4 and it works fine (just demo example).

I would like to extract field value from web page, for the known XPath, extracted and saved with Firebug

There is a number of XPath examples
at https://www.w3schools.com/xml/xpath_examples.asp
working with XML files

Since GM works for web pages and my XPath is

/html/body/div[3]/div[3]/div/div[6]/div[2]/div/div/div

and object is

<div class="gwt-Label">2083236893</div>

how can I make GM to extract numeric value as above from web page and save it to a file ?

I am looking for proper syntax to use XPath in Javascript as below

/html/body/div[3]/div[3]/div/div[6]/div[2]/div/div/div:(gwt-Label):value   (just pseudo code)

thank you

jack

Reply all
Reply to author
Forward
0 new messages