Question

How DOMXpath clicks a row on dynamic table depending on 3 innerText values in the table?

  • 28 February 2022
  • 2 replies
  • 230 views

I would like to click "chart' button in a row in a dynamically generated table using Capture but not sure how to do it. The goal is to run a patient search in an EHR system and select the correct patient chart in accordance to the first name, last name, and DOB. I will be using an .xlxs file to loop through patient lab results to add into their chart records.

See image attached for example. In an instance where the Bot encounters a duplicate patient, I would like for it to break/skip the duplicated patient and move on to the next record.

 

athena patient search with DOMXPath 

XPath for Patient : Bev Test, 01/01/1981

//*[@id="patientSearchResultsApp"]/div/div[3]/div[1]/table/tbody/tr[3]/td[8]/div/span[2]/a

The position of row to click differs based on search result. 


2 replies

Userlevel 5
Badge +11

Hi @Adan Navejas-Gallegos​ ,

 

You can use a counter variable to move row by row to check the data

 

//*[@id="patientSearchResultsApp"]/div/div[3]/div[1]/table/tbody/tr[3]/td[8]/div/span[2]/a you have to increment the value move next value.

 

First of all, you have to get the number of rows from the table and use the loop, assign the counter in the above path. while looping the record you skip or perform the required action.

 

Please try with the below method to get the Xpath,

 

image 

I believe you have shared some dummy data of the screenshot.

 

Thanks!

Userlevel 4
Badge +7

Hi @Adan Navejas-Gallegos​ ,

 

I've penned a series of articles on this very topic, which you can find below:

 

 

If none of those articles resolve your query, I'll try to come up with a solution for you.

 

Kind Regards,

Ashwin A.K

Reply