Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(210)

Issue 10933051: WebDriver bindings. (Closed)

Created:
8 years, 3 months ago by gram
Modified:
8 years, 3 months ago
CC:
reviews_dartlang.org
Visibility:
Public.

Description

Patch Set 1 #

Patch Set 2 : #

Total comments: 36

Patch Set 3 : #

Total comments: 1
Unified diffs Side-by-side diffs Delta from patch set Stats (+1830 lines, -0 lines) Patch
A pkg/webdriver/base64decoder.dart View 1 chunk +49 lines, -0 lines 0 comments Download
A pkg/webdriver/test/webdrivertest.dart View 1 2 1 chunk +421 lines, -0 lines 1 comment Download
A pkg/webdriver/webdriver.dart View 1 2 1 chunk +1360 lines, -0 lines 0 comments Download

Messages

Total messages: 6 (0 generated)
gram
8 years, 3 months ago (2012-09-12 18:14:03 UTC) #1
Siggi Cherem (dart-lang)
8 years, 3 months ago (2012-09-12 18:20:24 UTC) #2
Siggi Cherem (dart-lang)
+efortuna - adding Emily since she is very familiar with the webdriver APIs.
8 years, 3 months ago (2012-09-12 18:21:02 UTC) #3
Emily Fortuna
this is really exciting! Mostly minor comments. https://chromiumcodereview.appspot.com/10933051/diff/3001/pkg/webdriver/webdriver.dart File pkg/webdriver/webdriver.dart (right): https://chromiumcodereview.appspot.com/10933051/diff/3001/pkg/webdriver/webdriver.dart#newcode24 pkg/webdriver/webdriver.dart:24: * WebDriver. ...
8 years, 3 months ago (2012-09-12 20:15:53 UTC) #4
gram
ptal https://chromiumcodereview.appspot.com/10933051/diff/3001/pkg/webdriver/webdriver.dart File pkg/webdriver/webdriver.dart (right): https://chromiumcodereview.appspot.com/10933051/diff/3001/pkg/webdriver/webdriver.dart#newcode24 pkg/webdriver/webdriver.dart:24: * WebDriver. To get the id for an ...
8 years, 3 months ago (2012-09-12 22:42:09 UTC) #5
Emily Fortuna
8 years, 3 months ago (2012-09-13 00:03:14 UTC) #6
lgtm, with the exception that I hope we can make some sync option available for
people. :-P

This is awesome! Are you going to submit a patch to selenium as well? I think
you should -- it will really help make dart a good option for web testing, and
if we can provide good examples and use cases online of how to use it, it would
be a big win for dart+selenium.

https://chromiumcodereview.appspot.com/10933051/diff/3001/pkg/webdriver/webdr...
File pkg/webdriver/webdriver.dart (right):

https://chromiumcodereview.appspot.com/10933051/diff/3001/pkg/webdriver/webdr...
pkg/webdriver/webdriver.dart:42: *    }).chain((_) {
On 2012/09/12 22:42:09, gram wrote:
> On 2012/09/12 20:15:53, Emily Fortuna wrote:
> > Can we have synchronous versions of these calls instead or in addition? 
Right
> > now as this is, this is way less readable (and cumbersome) than even the
Java
> > API. (yikes!)
> 
> I don't believe so. The HTTP client APIs that Dart provides are async only; as
> (almost) every command here is a request/response, they are all async too.

I understand, but inside our implementation of setUrl, we could not return until
we get a response, providing the illusion of a synchronous api.

https://chromiumcodereview.appspot.com/10933051/diff/3001/pkg/webdriver/webdr...
pkg/webdriver/webdriver.dart:152: _url = 'http://${_host}:${_port}${_path}';
On 2012/09/12 22:42:09, gram wrote:
> On 2012/09/12 20:15:53, Emily Fortuna wrote:
> > nit, but I'm pretty sure this can just be written like:
> >  _url = 'http://$_host:$_port$_path';
> > or at the very least
> >  _url = 'http://${_host}:$_port$_path';
> 
> I'll change it, although I find the use of {} makes string interpolations more
> readable personally.

Okay.  Feel free to disregard that advice of mine if you prefer.

https://chromiumcodereview.appspot.com/10933051/diff/3001/pkg/webdriver/webdr...
pkg/webdriver/webdriver.dart:538: *  StaleElementReference - If one of the
script arguments is a WebElement
On 2012/09/12 22:42:09, gram wrote:
> On 2012/09/12 20:15:53, Emily Fortuna wrote:
> > These comments have a very javadoc-y feel. I think if you want separate
> > paragraphs in the comments above, you need to separate the text with an
empty
> > line: 
> > * client.
> > *
> > * The script argument .... 
> > etc. 
> > Also if you want the errors listed, I think you need to indent them at least
4
> > spaces to form a separate block, and then you can add bullets if you want.
> 
> I've tried to reformat things in a way that will work with Dartdoc, wven if
not
> always that elegantly. I also stripped down the comments on Potential Errors,
as
> these are highly repetitive and don't really need the long generic
explanations.

awesome!

https://chromiumcodereview.appspot.com/10933051/diff/6001/pkg/webdriver/test/...
File pkg/webdriver/test/webdrivertest.dart (right):

https://chromiumcodereview.appspot.com/10933051/diff/6001/pkg/webdriver/test/...
pkg/webdriver/test/webdrivertest.dart:241: Future f =
web_driver.newSession('htmlunit', { 'webStorageEnabled': true });
80 char :-P

Powered by Google App Engine
This is Rietveld 408576698