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?
Selenium, PhantomJS, WebdriverIO, Jasmine, and Compass are the most popular alternatives and competitors to Protractor.
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.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With