-1

take a look at this simple protractor test in the file example.js:

describe('this is my first test',function(){
    var ptor;
    it('step 1 ',function(){
        ptor = protractor.getInstance();
        ptor.get('#/');
    },30000);
});

in order to run this test with protractor i have to create a configuration file (my_conf.js) and add example.js to the spec. then from command line i'll invoke: protractor my_conf.js.
instead, i would like to run the test like this:
node example.js
so my question is, what modules do i have to require in my example.js test and how do i invoke describe and it functions? (you can ignore the protractor instance that will undefined)

thanks

4

1 回答 1

1

这可能行不通,我猜 protractor.js 是必须的,但除此之外,protractor 必须有理由仅在 selenium 服务器上运行,我认为 protractor js 将能够模拟和单击页面并充当虚拟 QA。

于 2013-11-25T22:07:03.343 回答