google / dart-sync-webdriver Goto Github PK
View Code? Open in Web Editor NEWWebDriver API for Dart
Home Page: https://pub.dartlang.org/packages/sync_webdriver
License: Apache License 2.0
WebDriver API for Dart
Home Page: https://pub.dartlang.org/packages/sync_webdriver
License: Apache License 2.0
This package still uses deprecated Dart 1 SCREAMING CAPS CONSTANTS. These will be removed shortly in Dart 2. This rewriting tool can be used to automatically migrate code in most cases: https://github.com/dart-lang/dart2_fix .
The error gives no information about the parameters which failed and the stack trace does not go back to the test code, so it's difficult to figure out which element could not be found.
factory WebDriver.fromExistingSession
should fetch the actual capabilities using JSON wire protocol rather than having the caller pass those in.
Environment: Dart VM version: 1.2.0 (Tue Feb 25 07:31:27 2014) on "macos_x64"
When lauunching unittests, many "Unable to connect to host" errors occurred.
dart-1.2.0/dart-sdk/bin/dart test/webdriver_test.dart
00:02 +0 -1: Alert no alert
Setup failed: Caught SocketException: Unable to connect to host
package:sync_socket/src/socket.dart 20:59 _connect
package:sync_socket/src/socket.dart 39:23 SocketSync.SocketSync
package:sync_socket/src/http_client.dart 72:28 HttpClientRequestSync.HttpClientRequestSync._
package:sync_socket/src/http_client.dart 32:11 HttpClientSync.postUrl
package:sync_webdriver/src/web_driver.dart 182:35 WebDriver._post
package:sync_webdriver/src/common.dart 78:22 SearchContext.findElement
test/src/alert_test.dart 34:34 main.<fn>.<fn>
dart:isolate _RawReceivePortImpl._handleMessage
I am working with dart-sync-webdriver on Mac OS X and am encountering issues that raise a SocketException intermittently during the tests. I took the following steps to setup my environment:
git clone https://github.com/google/dart-sync-webdriver.git
cd dart-sync-webdriver
pub get
./packages/sync_socket/../tool/build.sh
dart test/webdriver_test.dart
I started the Selenium server before calling the tests with the command:
java -jar ~/selenium-server-standalone-2.45.0.jar -Dwebdriver.chrome.driver=/Users/matthewbalvanz/bin/chromedriver
The environment appears to generally work as the browser is opening and the tests are interacting with the test page but approximately half of the tests then fail with a message like the following:
ERROR: Window size
Test failed: Caught SocketException: Unable to connect to host
package:sync_socket/src/socket.dart 18:59 _connect
package:sync_socket/src/socket.dart 36:23 SocketSync.SocketSync
package:sync_socket/src/http_client.dart 69:28 HttpClientRequestSync.HttpClientRequestSync._
package:sync_socket/src/http_client.dart 27:11 HttpClientSync.getUrl
package:sync_webdriver/src/web_driver.dart 240:35 WebDriver._get
package:sync_webdriver/src/web_driver.dart 131:47 WebDriver.window
test/src/window_test.dart 39:14 main.<fn>.<fn>
dart:isolate _RawReceivePortImpl._handleMessage
When I perform the same steps in an Ubuntu environment I do not receive any SocketExceptions in the tests.
Element 'Platform' from SDK library 'io.dart' is implicitly hidden by 'sync_webdriver.dart'.
I suggest to rename 'Platform' into 'BrowserPlatform'.
Hi,
I'm writing a test where I want to scroll an element (to test some infinite-scroll logic), but it doesn't look like there's any built-in way of doing that. The Mouse class doesn't seem to expose anything; there's a scroll method in the Touch class, but using that fails with "Underlying driver does not implement advanced user interactions yet.".
I can work around it by modifying the element's scrollTop manually, but it'd be nice to have something that'd trigger all the proper mouse/touch events.
Would be nice to see it in the list at https://github.com/google. Thanks!
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.