Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

browser.explore() vs the old ways to debug in Prortractor

In Protractor 5.0.0, there was a new browser.explore() method added to the API.

How is it different from the previous browser.pause() or browser.debugger() or the browser.enterRepl()? What is the preferred way to debug tests in Protractor?

like image 382
alecxe Avatar asked Jan 11 '17 23:01

alecxe


People also ask

What is the alternative tools ways of Protractor?

Selenium, PhantomJS, WebdriverIO, Jasmine, and Compass are the most popular alternatives and competitors to Protractor.

Why Protractor is deprecated?

Why is Protractor being deprecated? Protractor was created in 2013. During that time WebDriver APIs were not yet standard, because of which testers and developers faced difficulties in writing end to end tests as there was very little support for async/await.


1 Answers

Each one has their own advantages and disadvantages.

browser.explore() is pretty new one and also this has great advantage of debugging the test using the same script we are using in our test cases for eg.

element(by.cssContainingText('Username')).click();

browser.pause() is just allowing to type command 'c' Every time you press c like below in command prompt. You will be jumped to the next step/line/breakpoints to perform in the test script.

wd-debug> c 

browser.debugger() can be used from the browser console instead of using from command prompts where web driver is running. This will enable the user to use the client side scripts on the console.

The other one i haven't worked with may be once i try let you know that too.

like image 115
krishnarajanr Avatar answered Oct 16 '22 15:10

krishnarajanr