Need to find a content text of an attribue in CSS, should I use XPATH?
Hello, can someone help me,using the example below on how to find an attribute from the page element and copy the content text to a variable?
The end goal is to copy the result to a spreadsheet (cvs) file.
I believe you need to use the XPATH method, I am just starting to get involve with TC, so I am not familiar with all the methods.
See the screenshot of the CSS structure, I need to find the content text that is shown highlighted.
<div _ngcontent-swp-c132="" class="ng-star-inserted">Machine name: Device 102373</div>
<div _ngcontent-swp-c132="">Issued: 01/17/2023 5:46 PM</div>
Here is the xpath copy. <div _ngcontent-swp-c132="" class="ng-star-inserted">
//*[@id="mat-tab-content-1-1"]/div/perfect-scrollbar/div/div[1]/div/div/visus-refractive-data[1]/div/div[1]/div[2]/div[1]
Here is the xpath copy <div _ngcontent-swp-c132="">
//*[@id="mat-tab-content-1-1"]/div/perfect-scrollbar/div/div[1]/div/div/visus-refractive-data[1]/div/div[1]/div[2]/div[2]
Sorry nedbacan , I thought I was responding to your message but it was trevino912 !
If your project is set to use XPath, then the Object Spy tool will show you the query e.g. "//a[.='< Home']"
Also, if you use Keyword Testing and check the properties of the object, you will see the XPath that TC has identified.