GithubHelp home page GithubHelp logo

dalek-internal-webdriver's People

Contributors

asciidisco avatar bitdeli-chef avatar mischah avatar rodneyrehm avatar ryanzec avatar

Stargazers

 avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

dalek-internal-webdriver's Issues

assert.exists Webdriver command fails, but Dalek reports success

Let's say we run an assert.exists with an invalid selector such as:

.assert.exists('h1:contains("FOoooooooooooooo")','LIAR!!!!!!!!')

The Webdriver response is pretty clear that there has been an error, but Dalek still things it succeeded:

☁ [WEBDRIVER] webdriver: 200 POST /session/5600592b61bb652f2f6175d96484529c/element
☁ [WEBDRIVER] webdriver: {"sessionId":"5600592b61bb652f2f6175d96484529c","status":12,"value":{"message":"invalid element state: Failed to execute 'querySelector' on 'Document': 'h1:contains(\"FOoooooooooooooo\")' is not a valid selector.\n  (Session info: chrome=36.0.1985.125)\n  (Driver info: chromedriver=2.9.248307,platform=Mac OS X 10.9.3 x86_64)"}}
✔ EXISTS LIAR!!!!!!!!

The type() method clears the input

Now from what I remember type() is intentionally clearing the input because of an issue with FireFox and placeholder text however doing so make it impossible to test certain functionality.

For example, one of my test cases might be to type something into input and then wait for an element to appear that is ajax driven. Then I want to type the back space and make sure that ajax driven element goes away but the code has a delay between the last character being type and the ajax request going out. Now if I type the text and back space together with one call to .type() (and since it clears out the text with each call to .type(), I have to), the element that is ajax driven would have never been added to the DOM so I can test that it was properly removed.

Ultimately the question is whether to support FireFox while it has this bug and not be able to test everything or be able to test everything or not support FireFox until they fix there bug but be able to test everything. For my use case, I prefer the second option as I am using DalekJS as more of "unit test" like tests for the UI (all ajax requests are being mocked) instead of a replacement for Selenium (mainly because I don't think DalekJS can act as a replacement for selenium, at least not yet).

Be able to access the window object of the testing page

In order to be able to integrate DalekJS more closely with 3rd party libraries/framework (the ability to create framework specific functionality which would be especially useful for MV* frameworks) it should be possible to gain access to the window/document object (for both actions and assertions). For example the Angular object is attached to the document of the page so if we had access to that, we could do AngularJS specific things.

Since I don't have a lot of experience working with the JSON Wire Protocol, I am not 100% sure if this is possible although I know the Protractor (https://github.com/angular/protractor) does this and it uses selenium's webdriverjs under the hood (which uses the JSON Wire Protocol).

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.