webdriverio-boneyard / webdrivercss

Regression testing tool for WebdriverIO v4
http://webdriver.io
MIT License
616 stars 106 forks source link

Use webdrivercss without webdriverjs #14

Closed richard-flosi closed 10 years ago

richard-flosi commented 10 years ago

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

christian-bromann commented 10 years ago

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 commented 10 years ago

Ok. Thanks @christian-bromann :)

christian-bromann commented 10 years ago

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

richard-flosi commented 10 years ago

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 commented 10 years ago

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 commented 10 years ago

@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 commented 10 years ago

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 commented 10 years ago

@richard-flosi thanks for your feedback

dandv commented 9 years ago

@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 commented 9 years ago

@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.