GithubHelp home page GithubHelp logo

google / dart-sync-webdriver Goto Github PK

View Code? Open in Web Editor NEW
20.0 10.0 26.0 205 KB

WebDriver API for Dart

Home Page: https://pub.dartlang.org/packages/sync_webdriver

License: Apache License 2.0

Dart 96.81% HTML 2.45% Shell 0.74%

dart-sync-webdriver's Issues

Dart 1.2.0 - Unable to connect to host

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

Intermittent SocketExceptions when running tests on Mac OS X

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.

Add some way to scroll an element

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.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.