1

The below code highlights the 'Computer' link but the highlighted text is not seen in the screenshot.

Scenario: Sample UI automation test

* configure driver = {type: 'chrome'}
    Given driver 'https://www.amazon.in/'
     Then maximize()
    * highlight("//a[text()='Computers']")
   * delay(3000)
  * screenshot()
      * screenshot("//a[text()='Computers']")

Is there a way we can capture highlighted area in screenshot

1 Answers1

0

Highlighting is just for developers. Consider what you are asking for as not supported by Karate. You are welcome to contribute code to make Karate better.

You may be able to get what you want by calling some JS to set HTML / DOM styles. How to do that I leave it to you to do research.

Peter Thomas
  • 54,465
  • 21
  • 84
  • 248