Skip to main content
Question

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

  • February 28, 2022
  • 2 replies
  • 472 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

Tamil Arasu10
Most Valuable Pathfinder
Forum|alt.badge.img+16
  • Most Valuable Pathfinder
  • 3276 replies
  • February 28, 2022

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!


Ashwin A.K
Forum|alt.badge.img+8
  • Navigator | Tier 3
  • 2445 replies
  • March 1, 2022

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


Cookie policy

We use cookies to enhance and personalize your experience. If you accept you agree to our full cookie policy. Learn more about our cookies.

 
Cookie settings