microsoft / WinAppDriver

Windows Application Driver
MIT License
3.7k stars 1.41k forks source link

Not Implemented exception when executing js script #73

Open dnovikau opened 8 years ago

dnovikau commented 8 years ago
  1. I'm trying to scroll down the list of element on the screen by calling execution of javascript like this: driver.ExecuteScript("arguments[0].scrollIntoView()", element);

and test failed with the following output in cmd:

POST /session/55DDFBA4-E1B7-4CFA-ADFB-A7E8E8CCC0C0/execute HTTP/1.1 Accept: application/json, image/png Content-Length: 139 Content-Type: application/json;charset=utf-8 Host: 127.0.0.1:4723

{"script":"arguments[0].scrollIntoView()","args":[{"ELEMENT":"42.7341964.2.414","element-6066-11e4-a52e-4f735466cecf":"42.7341964.2.414"}]} HTTP/1.1 501 Not Implemented Content-Length: 84 Content-Type: text/plain; charset=utf-8

Command not implemented: POST: /session/55DDFBA4-E1B7-4CFA-ADFB-A7E8E8CCC0C0/execute

When this method is supposed to be implemented? Or is there any workaround?

alakshmi1030 commented 8 years ago

We haven't implemented the async javascript API (/session/:sessionid/execute) - this is on our backlog as a feature enhancement.

If you can see the element, you can send a click to it even if its not in the view. This is coming in the next release of WinAppDriver 0.6.

ysabato commented 7 years ago

Hi, unfortunately i am not able to send a click to element when it's not in view. I am using 0.6v. Do yoou know why this is not working?

alsorokin commented 7 years ago

Hey @alakshmi1030 Any estimation on when this can be implemented?

tarunsujit commented 7 years ago

Any update on JavascriptExecutor implementation?

Clemensreijnen commented 7 years ago

is there a WinAppDriver JS desktop app example available?

hassanuz commented 7 years ago

@Clemensreijnen Not yet. We welcome any JS (or any other languages) examples from the community!

Clemensreijnen commented 7 years ago

@hassanuz got some example up and running. https://github.com/Clemensreijnen/AppiumOnWindowsWithJS/blob/master/README.md

vishnu45 commented 6 years ago

Is this enhancement coming in any upcoming release? Is there any other alternative to scroll web elements into view? I am unable to interact with these since the elements are hidden from view.

RobinSmit commented 5 years ago

Is there any news on this topic?

hassanuz commented 5 years ago

Hi @vishnu45 and @RobinSmit,

WinAppDriver doesn't support ExecuteScript as of right now.

naeemakram commented 4 years ago

Hassan, its 2020. Any update on this one? I got a student in my course who's unable to access HTML controls placed inside of an Internet Explorer control which sits in her UI. Any clue in this regard will be helpfu.