Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Java shim for SET_CURRENT_WINDOW_POSITION fails with geckodriver #3893

Closed
pbi-qfs opened this issue Apr 24, 2017 · 3 comments
Closed

Java shim for SET_CURRENT_WINDOW_POSITION fails with geckodriver #3893

pbi-qfs opened this issue Apr 24, 2017 · 3 comments
Labels
C-java G-w3c Requires change to W3C Spec

Comments

@pbi-qfs
Copy link

pbi-qfs commented Apr 24, 2017

Meta -

OS:
macOS
Selenium Version:
3.4.0
Browser:
Firefox 52esr, 53.0, 54.0b1, 55

Expected Behavior -

window is positioned correctly

Actual Behavior -

WebDriverException is throws (FF52esr) or the command is ignored

Steps to reproduce -

driver.get("http://www.mozilla.com")
driver.manage().window().setPosition(new Point(100,100))

Request is incorrectly sent to geckodriver:

1493047920997	webdriver::server	DEBUG	→ POST /session/e4c3816b-2f9a-fe43-9d8b1493047920999	Marionette	TRACE	conn0 -> [0,3,"setWindowRect",{"height":null-dc8f00793dc4/window/rect {","width":null,"x":null,"y":null}]
script":"window.screenX = arguments[0]; window.screenY = arguments[1]","args":[100,100]}
1493047920998	geckodriver::marionette	TRACE	→ 68:[0,3,"setWindowRect",{"height":null,"width":null,"x":null,"y":null}]
1493047921000	geckodriver::marionette	TRACE	← [1,3,null,{"x":4,"y":23,"width":1280,"height":877}]
1493047921000	webdriver::server	DEBUG	← 200 OK {"value": {}}

Seems to be related to these lines of code: https://github.com/SeleniumHQ/selenium/blob/master/java/client/src/org/openqa/selenium/remote/http/W3CHttpCommandCodec.java#L267-L271

@andreastt andreastt changed the title Cannot set Window Position with Java-Bindings, Geckodriver 0.16 and Selenium 3.4.0 Java shim for SET_CURRENT_WINDOW_POSITION fails with geckodriver Apr 24, 2017
@andreastt andreastt added C-java G-w3c Requires change to W3C Spec labels Apr 24, 2017
@andreastt
Copy link
Member

Set Window Rect expects a JSON Object that looks like {x: <int>, y: <int>, width: <uint>, height: <uint>}.

@pbi-qfs
Copy link
Author

pbi-qfs commented Apr 25, 2017

Provided fix in PR #3898

@lmtierney
Copy link
Member

see #3898

gempesaw added a commit to teodesian/Selenium-Remote-Driver that referenced this issue May 25, 2017
Unfortunately set window position functionality broke in 3.4.0. Looks
like the fixes are merged into master, but there hasn't been a
subsequent release?

    SeleniumHQ/selenium#3893
    SeleniumHQ/selenium#3898

While it's unfortunate to skip tests like this, it seems independent
of our bindings - it's already broken in 1.12, so...bummer.
gempesaw added a commit to teodesian/Selenium-Remote-Driver that referenced this issue May 25, 2017
Unfortunately set window position functionality broke in 3.4.0. Looks
like the fixes are merged into master, but there hasn't been a
subsequent release?

    SeleniumHQ/selenium#3893
    SeleniumHQ/selenium#3898

While it's unfortunate to skip tests like this, it seems independent
of our bindings - it's already broken in 1.12, so...bummer.
@lock lock bot locked and limited conversation to collaborators Aug 18, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C-java G-w3c Requires change to W3C Spec
Projects
None yet
Development

No branches or pull requests

3 participants