cancel
Showing results for 
Search instead for 
Did you mean: 

How to read a text which varies its position in the web page

SiddharthAbiram
Level 3
Nice to interact with you all. I have a webpage. I want to read a particular text for example the Industry name "Telecommunications". 

36294.png
My problem is that this field comes in different position so I cannot use Match Index to point to this field correctly. Could you please suggest a method that I can use to identify the label (i.e.) "Industry" and capture the adjacent value (i.e.) "Telecommunications".

If it is solved, the could you please point me to the link of the answer. Thanks in advance.
2 REPLIES 2

You can use the XPath expressions here in the Web Path attribute for the modeler of Browser Mode type. The following-sibling expression will help you to get what you want.

You can see below how I have used it:

36291.png

I have used the expression: //th[text()='Full name']/following-sibling::td

If I break the query one by one, //th[text()='Full name'] will only return me the label full name. More precisely it says return me the TD tag where the textual information is equal to 'Full name' as you can see below:

36292.png

When I use the query : //th[text()='Full name']/following-sibling::td, it means that go to the nearest or next td element that is present after the th tag whose text was 'Full name' and that is what is the full name I want as shown below:

36293.png


Something similar you can use, it will also depend on what tags are there in you web page and how is the structure but you can experiment and proceed now I hope. Let us know if it helps!
---------------------------------------------------------------------------------------------------------------------------------------
Hope this helps you out and if so, please mark the current thread as the 'Answer', so others can refer to the same for reference in future.
Regards,
Devneet Mohanty,
SS&C Blueprism Community MVP 2024,
Automation Architect,
Wonderbotz India Pvt. Ltd.

SiddharthAbiram
Level 3
Hi @devneetmohanty07 Thanks a lot for the response. Could you also please take a look into my doubt in other thread.​