Solved

How to search text on webpage and do something after

  • 9 March 2023
  • 2 replies
  • 199 views

Badge +1

On my webpage i have a list order. i want to find an orderID and click it . this is a div type. please help me !

 

icon

Best answer by AWilson 9 March 2023, 18:24

View original

2 replies

Badge +3

Hi,

 

I would do this by using a variable in the XPath. You can write an XPath that looks for your element on the webpage based on the value of your attribute in AA.

 

I would imagine that the DOMXPath would look something like this:

//a[text() = "Your Variable Here"]

 

If you aren’t comfortable writing your own DOMXPaths, this tutorial gives a great overview of how it works: 

 

I hope this helps

Adam

Badge +1

Hi,

 

I would do this by using a variable in the XPath. You can write an XPath that looks for your element on the webpage based on the value of your attribute in AA.

 

I would imagine that the DOMXPath would look something like this:

//a[text() = "Your Variable Here"]

 

If you aren’t comfortable writing your own DOMXPaths, this tutorial gives a great overview of how it works: 

 

I hope this helps

Adam

Thank you, i have  solved this problem with your guide 

 

Reply