cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a value from Web Page ?

MadhuGarg
Level 4
Hi All,

Hope everyone is safe & secure !

How can I read a data from a web page using Code Stage ? 
Data I mean to say, Suppose against "PO Number" 12345 is present. So I want to read 12345.

Kindly assist.

------------------------------
Madhu Garg
------------------------------
3 REPLIES 3

AloknathSingh
Level 4
Hi Madhu,
Can I ask why are you not reading data using any of the spying modes(AA/html)?

------------------------------
Aloknath Singh
Senior RPA Developer
Jaguar Land Rover
Asia/Kolkata
917021429197
------------------------------

Hi Aloknath,

I am able to read the data using AA/html mode. But problem with the html mode is that the "TR" value which we used to make dynamic is not in sync with other TR values. So we are unable to make it Dynamic.
Problem with the AA mode is it takes a long time to read & sometimes it terminates the complete Blue Prism application itself.

So i thought to apply the Code Stage to resolve.
Kindly assist.

------------------------------
Madhu Garg
------------------------------

Assuming you use chrome/firefox/edge (not IE html mode), you can use xpath to do it.
If value is in a separate tag around "PO Number", you use relative xpath, if it is same tag, then use contains..
For example, to find value near Recommend button in this page in the 3rd post, use xpath like: "(//a[text()='Recommend'])[3]/../a[1]"
To find "Posted x days ago" in second post you could do something like "(//span[starts-with(.,'Posted') and contains(.,'days ago')])[2]"

In your case it might look like: "//div[text()='PO Number']/../div[2]", can't tell without looking at your html.

------------------------------
Andrey Kudinov
Project Manager
Europe/Moscow
------------------------------