WinAppDriver icon indicating copy to clipboard operation
WinAppDriver copied to clipboard

Unable to Highlight windows control or form as with mstest

Open johnjphp opened this issue 5 years ago • 11 comments

Hi, do we know when windows appl driver will have the functionality to highlight a WFP control or form - like we were able to do with MStest and coded UI? This is very valuable. control.DrawHighlight();

thank you, John

johnjphp avatar Apr 08 '19 18:04 johnjphp

Hey John,

I too raised a same question - https://github.com/Microsoft/WinAppDriver/issues/647 Please let me know if you have any updates.

Regards, Kiran B.

KiranBehara avatar Apr 09 '19 13:04 KiranBehara

I woud like to see this too

technoscavenger avatar Apr 09 '19 13:04 technoscavenger

This scenario is well understood and I recognize the value. Unfortunately, WebDriver spec doesn't currently have such API endpoint that highlights certain element on demand. And without an implementation in the language bindings (C#, Java, JavaScript, etc.), this command cannot be performed.

An alternative to this would be to implicitly highlight the element that is currently undergoing certain operation (isSelected, Click, SendText, etc.). But this would require some sort of configuration attribute in the capabilities that is turned off by default.

timotiusmargo avatar Apr 10 '19 01:04 timotiusmargo

In life & death scenarios, we might use the screenshot feature to get a screenshot of the control which is being found. At least that would give us some idea in some scenarios.

naeemakram avatar Apr 10 '19 05:04 naeemakram

go here and submit a pull request. All they can say is "no" https://github.com/w3c/webdriver/ Warning: you'll have to submit changes here as well https://github.com/web-platform-tests/wpt/tree/master/webdriver

ericleigh007 avatar Apr 10 '19 22:04 ericleigh007

This scenario is well understood and I recognize the value. Unfortunately, WebDriver spec doesn't currently have such API endpoint that highlights certain element on demand. And without an implementation in the language bindings (C#, Java, JavaScript, etc.), this command cannot be performed.

An alternative to this would be to implicitly highlight the element that is currently undergoing certain operation (isSelected, Click, SendText, etc.). But this would require some sort of configuration attribute in the capabilities that is turned off by default.

Do you mean the end point is not exposed by Appium ? Do you have any implementation to show for the alternative approach ? Is there a chance of having this feature in next releases ?

KiranBehara avatar Apr 15 '19 13:04 KiranBehara

Hi @KiranBehara,

Windows Application Driver follows Appium interface which inherits the W3C WebDriver interface. None of these API surfaces has the endpoint to draw a highlight rectangle in question. As @ericleigh007 pointed out, you can attempt to propose it at the Selenium or Appium specification level. Once, it is accepted with a specified calling convention, it will be fairly straight forward to support the API on the Windows Application Driver side.

timotiusmargo avatar Apr 15 '19 21:04 timotiusmargo

Hi @KiranBehara,

Windows Application Driver follows Appium interface which inherits the W3C WebDriver interface. None of these API surfaces has the endpoint to draw a highlight rectangle in question. As @ericleigh007 pointed out, you can attempt to propose it at the Selenium or Appium specification level. Once, it is accepted with a specified calling convention, it will be fairly straight forward to support the API on the Windows Application Driver side.

Thank you :)

KiranBehara avatar Apr 17 '19 12:04 KiranBehara

Can we have experimental feature in WinAppDriver to support drawing a highlight? For example, support /session/:sessionId/element/:id/draw_highlight?

As a community we can try it and solidify the implementation. Once we are happy we propose it to WebDriver team?

technoscavenger avatar Apr 17 '19 13:04 technoscavenger

It shouldn't be a problem, the code for highlighting items is already written & working in The UI Recorder. Yes, it can be done.

naeemakram avatar Apr 23 '19 14:04 naeemakram

Is this functionality in place yet?

chilakamarthi avatar Jun 28 '22 13:06 chilakamarthi

I'd love to see this in place, similar to the way it operated in CodedUI.

johndlawlor avatar Feb 27 '23 15:02 johndlawlor