How to capture specific text from screen and than display it via log message.
Hi I am trying to capture on screen CartID and just need to display the cart number not the text saying SAP Cart ID:
I tried using set variable value and creating a variable under the project and than used the code expression to get the value
and used log message to display the variable value but nothing is displaying when I run the keyword test.
can anyone please share any video or steps they use to get that and to display exact value rather than just displaying the whole thing. I really appreciate it.
or if there is a video anyone have it'll be so much helpful.
When you use the Object Spy does it recognize the ID value independently, or it only recognize the entire panel?
If it does not single out the ID, you will need to parse the content to extract the required value as rraghvani stated.
In any case, you will need to read a specific property value from your Mapped object Aliases.browser.pageUserDasboard.panelSapCardId, for example the value of contentText.
You can try the following example using https://www.w3schools.com/TAGs/tryit.asp?filename=tryhtml5_output
And you can log it directly or store into variable and then log the value
Let me know if you need additional assistance.