This adds two resources to the wire protocol:
/session/:sessionId/window/:windowHandle/size
/session/:sessionId/window/:windowHandle/location
Both resources accept GET and POST requests to get and set the values.
http://codereview.appspot.com/5342045/diff/11001/javascript/atoms/window.js File javascript/atoms/window.js (right): http://codereview.appspot.com/5342045/diff/11001/javascript/atoms/window.js#newcode174 javascript/atoms/window.js:174: win.resizeTo(size.width, size.height); This won't work for FF7? ~ if ...
13 years, 10 months ago
(2011-11-05 16:20:23 UTC)
#5
http://codereview.appspot.com/5342045/diff/11001/javascript/atoms/window.js File javascript/atoms/window.js (right): http://codereview.appspot.com/5342045/diff/11001/javascript/atoms/window.js#newcode174 javascript/atoms/window.js:174: win.resizeTo(size.width, size.height); On 2011/11/05 16:20:23, luke.semerau wrote: > This ...
13 years, 10 months ago
(2011-11-05 16:25:04 UTC)
#6
http://codereview.appspot.com/5342045/diff/11001/javascript/atoms/window.js
File javascript/atoms/window.js (right):
http://codereview.appspot.com/5342045/diff/11001/javascript/atoms/window.js#n...
javascript/atoms/window.js:174: win.resizeTo(size.width, size.height);
On 2011/11/05 16:20:23, luke.semerau wrote:
> This won't work for FF7? ~ if it's the main window. Am I missing something? Or
> are we just planning on not supporting resizing of the main window (because
the
> browsers don't allow it)?
This works fine in FF7. The extension has more privileges when it comes to
moving/resizing than the normal executeScript calls - this is the reason I'm
adding the new API.
Ah, good :) I have a patch for python ready to add this too. -Luke ...
13 years, 10 months ago
(2011-11-05 16:36:24 UTC)
#7
Ah, good :)
I have a patch for python ready to add this too.
-Luke
On Nov 5, 2011, at 9:25 AM, jari.bakken@gmail.com wrote:
>
> http://codereview.appspot.com/5342045/diff/11001/javascript/atoms/window.js
> File javascript/atoms/window.js (right):
>
>
http://codereview.appspot.com/5342045/diff/11001/javascript/atoms/window.js#n...
> javascript/atoms/window.js:174: win.resizeTo(size.width, size.height);
> On 2011/11/05 16:20:23, luke.semerau wrote:
>> This won't work for FF7? ~ if it's the main window. Am I missing
> something? Or
>> are we just planning on not supporting resizing of the main window
> (because the
>> browsers don't allow it)?
>
> This works fine in FF7. The extension has more privileges when it comes
> to moving/resizing than the normal executeScript calls - this is the
> reason I'm adding the new API.
>
> http://codereview.appspot.com/5342045/
http://codereview.appspot.com/5342045/diff/11001/javascript/firefox-driver/extension/components/firefoxDriver.js File javascript/firefox-driver/extension/components/firefoxDriver.js (right): http://codereview.appspot.com/5342045/diff/11001/javascript/firefox-driver/extension/components/firefoxDriver.js#newcode1334 javascript/firefox-driver/extension/components/firefoxDriver.js:1334: // TODO(jari): could this be made into a precondition? ...
13 years, 10 months ago
(2011-11-05 20:51:18 UTC)
#8
http://codereview.appspot.com/5342045/diff/11001/javascript/firefox-driver/ex...
File javascript/firefox-driver/extension/components/firefoxDriver.js (right):
http://codereview.appspot.com/5342045/diff/11001/javascript/firefox-driver/ex...
javascript/firefox-driver/extension/components/firefoxDriver.js:1334: //
TODO(jari): could this be made into a precondition?
IIRC either of the following will work for preconditions:
1) Actually compile the firefoxdriver using closure, which Simon is working on
at the moment
2) In the FirefoxDriver constructor, do the precondition setting, as is done for
some of the alerts methods at the moment. I don't like this, as it's not very
discoverable, and a runtime rather than compile-time thing, but it would work :)
http://codereview.appspot.com/5342045/diff/11001/javascript/firefox-driver/extension/components/firefoxDriver.js File javascript/firefox-driver/extension/components/firefoxDriver.js (right): http://codereview.appspot.com/5342045/diff/11001/javascript/firefox-driver/extension/components/firefoxDriver.js#newcode1334 javascript/firefox-driver/extension/components/firefoxDriver.js:1334: // TODO(jari): could this be made into a precondition? ...
13 years, 10 months ago
(2011-11-05 22:02:07 UTC)
#9
http://codereview.appspot.com/5342045/diff/11001/javascript/firefox-driver/ex...
File javascript/firefox-driver/extension/components/firefoxDriver.js (right):
http://codereview.appspot.com/5342045/diff/11001/javascript/firefox-driver/ex...
javascript/firefox-driver/extension/components/firefoxDriver.js:1334: //
TODO(jari): could this be made into a precondition?
On 2011/11/05 20:51:18, dawagner wrote:
> IIRC either of the following will work for preconditions:
> 1) Actually compile the firefoxdriver using closure, which Simon is working on
> at the moment
> 2) In the FirefoxDriver constructor, do the precondition setting, as is done
for
> some of the alerts methods at the moment. I don't like this, as it's not very
> discoverable, and a runtime rather than compile-time thing, but it would work
:)
I'm not sure how I'd get hold of the command parameters from the constructor
though. Seems like waiting for Simon's work would make sense :)
LGTM with one small nit http://codereview.appspot.com/5342045/diff/8022/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java File java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java (right): http://codereview.appspot.com/5342045/diff/8022/java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java#newcode566 java/client/src/org/openqa/selenium/remote/RemoteWebDriver.java:566: public void setPosition(int x, ...
13 years, 10 months ago
(2011-11-07 16:18:28 UTC)
#12
Issue 5342045: Implement window resize and move for Firefox and Ruby + Java.
Created 13 years, 10 months ago by jarib
Modified 13 years, 10 months ago
Reviewers: jleyba, Simon Stewart, dawagner, luke.semerau, simonstewart
Base URL:
Comments: 53