Skip to content
This repository has been archived by the owner on Dec 18, 2019. It is now read-only.

Use webdrivercss without webdriverjs #14

Closed
richard-flosi opened this issue Aug 21, 2014 · 10 comments
Closed

Use webdrivercss without webdriverjs #14

richard-flosi opened this issue Aug 21, 2014 · 10 comments

Comments

@richard-flosi
Copy link

Is it possible to use webdrivercss without webdriverjs?
Any hints on doing so?

@christian-bromann
Copy link
Contributor

No, it is a plugin and enhances the client instances with all these useful commands. It may be possible to port the functionality to get this working with other Node webdriver libraries. But this is not my job ;-)

@richard-flosi
Copy link
Author

Ok. Thanks @christian-bromann :)

@christian-bromann
Copy link
Contributor

Why are you asking? Are you looking for something specific?

@richard-flosi
Copy link
Author

I'm exploring different testing frameworks at the moment. We had tests in CasperJS/PhantomJS, but we want to be able to run tests against Selenium, so we have to ditch CasperJS as far as I can tell. I was using PhantomCSS previously which led me to webdriverjs/css. At this point I'm trying to see if I can get webdrivercss to work with NightwatchJS which has a very similar API to webdriverjs.

@christian-bromann
Copy link
Contributor

afaik there are some libraries out there that do regression testing. There is an excellent talk from @cburgmer about this topic.

WebdriverCSS wont work with NightwatchJS. Why are you not using WebdriverIO if the API is similiar? O.o

@christian-bromann
Copy link
Contributor

@richard-flosi you mentioned that you have been exploring several e2e testing frameworks and it seems that you've decided to use nightwatchjs. Any reasons for that? Since webdriverio and nightwatchjs use to have similar apis I am wondering what was your motivation to switch over?

@richard-flosi
Copy link
Author

Nightwatch took care of more of the boilerplate stuff for me like auto-starting selenium and having a fairly comprehensive config file.

Working on the WebdriverIO version of my test I ran into an issue with GhostDriver not being able to handle <input type="file" multiple> fields with multiple set which I had to work around. Looks like I could use execute to do it in WebdriverIO which is basically what I did when rewriting the test in Nightwatch: .execute('$(\'input[type="file"][multiple]\').removeAttr(\'multiple\');'), though I'm not sure exactly how I'd do that in WebdriverIO since I didn't try to hard. :(

In short, WebdriverIO is great, but Nightwatch felt more complete. Each has had it's own challenges thus far. :)

@christian-bromann
Copy link
Contributor

@richard-flosi thanks for your feedback

@dandv
Copy link

dandv commented Aug 1, 2015

@richard-flosi: I was intrigued by your comparison of Nightwatch with WebdriverIO and looked at the Nightwatch syntax on their home page:

module.exports = {
  'Demo test Google' : function (client) {
    client
      .url('http://www.google.com')
      .waitForElementVisible('body', 1000)
      .assert.title('Google')
      .assert.visible('input[type=text]')
      .setValue('input[type=text]', 'rembrandt van rijn')
      .waitForElementVisible('button[name=btnG]', 1000)
      .click('button[name=btnG]')
      .pause(1000)
      .assert.containsText('ol#rso li:first-child',
        'Rembrandt - Wikipedia')
      .end();
  }
};

This is quite verbose, compared to WebdriverIO; esp. the waitFor statements. Have you seen the comparison with selenium-webdriverjs and WD.js? Does Nightwatch have a comparably simple syntax?

@richard-flosi
Copy link
Author

@dandv Nightwatch no longer requires the waitFor timeout param, you can set it globally. Can you provide a comparison example of what feels more verbose in Nightwatch compared to WebdriverIO? Their apis are both fluent and almost identical from what I remember.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants