Quantcast
Channel: Chutzpah - A JavaScript Test Runner
Viewing all articles
Browse latest Browse all 1864

New Post: Using chutzpah with mocha and selenium-webdriver

$
0
0
Hello!

I have a little test (level noob) and I encountered an error. I can't find a solution to it .

The test is :
var webdriver = require('selenium-webdriver');
var test = require('selenium-webdriver/testing');
describe('ehr.NXT -> ', function () {
    var driver;
    before('Accesare pagina', function () {
        driver = new webdriver.Builder().withCapabilities(webdriver.Capabilities.chrome()).build();
        driver.get('http://iordachemc.wordpress.com');
    });

    it('In cautare de atitudine.', function () {
        
        driver.findElement(webdriver.By.name('s')).sendKeys('Atitudine');
        driver.findElement(webdriver.By.id('searchsubmit')).click();
    });

    it('Test gol', function () { });

    after('Se da stingerea!', function () {
        driver.quit();
    });
});
The error is :

------ Discover test started ------
Error: ReferenceError: Can't find variable: require
in file:///d:/surse/ehr.nxt/tests/autojs/test/exemplu.js (line 1)
While Running:d:\surse\ehr.nxt\tests\autojs\test\exemplu.js

========== Discover test finished: 0 found (0:00:01.0211021) ==========

Viewing all articles
Browse latest Browse all 1864

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>