Is `webdriver-manager start` necessary?

I delve into the world of Protractor tests for AngularJS.

In all tutorials, it is recommended that you complete the following steps after webdriver-manager update and before the test webdriver-manager start : webdriver-manager start

According to the webdriver-manager person, the start command will start the selenium server. However, when I run the above command, I can see something at http://127.0.0.1-00-00444/wd/hub

My questions are: is this necessary?

I am currently running my tests without the above command.

All I do is: webdriver-manager update php -S localhost:8000 -t dist/ protractor ./test/protractor.config.js

My tests run as expected, although I excluded webdriver-manager start .

Can someone explain why webdriver-manager start necessary?

: EDIT:

My protractor /fooTests.js :

 exports.config = { directConnect: true, capabilities: { 'browserName': 'chrome' }, specs: ['protractor/fooTests.js'], jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000 } }; 

My protractor /fooTests.js :

 describe('test for the bar code', function() { it('should login', function() { browser.get('http://localhost:8000'); element(by.model('password')).sendKeys('123456'); element(by.css('[type="submit"]')).click(); }); it('should inspect element ', function() { expect(element(by.id('foo-script')).isPresent()).toBe(true); console.log('Login Success'); }); }); 
+5
source share
1 answer

The protractor sends the Selenium and Selenium commands, exchanging data with browsers using its drivers.

 webdriver-manager start 

begins selenium.

There are 3 main options:

  • directConnect . This makes the protractor communicate directly with selenium drivers without using a Selenium server. However, the functionality of this option is limited:

directConnect: true - your test script directly communicates with the Chrome or Firefox driver, bypassing any Selenium server. If so, the settings for seleniumAddress and seleniumServerJar will be ignored. If you try to use a browser other than Chrome or Firefox, an error is generated.

  1. Connect to an already running selenium server (local or remote) specified by seleniumAddress . The server can be started using the webdriver-manager start script.

  2. Starting the server from a test script.

You can study all the parameters in the documentation https://github.com/angular/protractor/blob/master/docs/server-setup.md

+3
source

All Articles