JavaScript driver for selenium test automation.
Questions tagged [webdriverjs]
68 questions
6
votes
3 answers
Testing Angularjs Application with Selenium
I am testing an angular js application
Link Angular js App
when i click on the UI Kit link on the web application i am getting the following error -
at demoaj.Ajapp.main(Ajapp.java:16) Caused by:
org.openqa.selenium.NoSuchElementException:…

Chaitanya Pujari
- 367
- 4
- 16
5
votes
1 answer
Capture image using specific element locator using protractor tool
I am very new to Protractor and Javascript/Node.js.
I had a requirement where i need to take the screenshot of particular element and show the same in the jasmine report(Please note that the screenshot present in the report should not contain the…

user6162630
- 81
- 8
4
votes
2 answers
Stop cucumberJs when scenario fails - protractor and cucumberjs
I want to stop cucumber from running a failing test till the end because that wastes time for our continuous integration since we need rapid feedback.
I am using the javascript implementation of cucumber, cucumberJs with protractor.
Here's what I…

pelican
- 5,846
- 9
- 43
- 67
4
votes
1 answer
Protractor/cucumberjs rerunning failed tests/cucumber features/specs
Given that automated UI tests sometimes fail due to flakiness, an ability to rerun only the failed tests becomes incredibly useful in a framework like protractor.
Unfortunately, as of 09/13/2016, there's no way to rerun failed tests with…

pelican
- 5,846
- 9
- 43
- 67
4
votes
1 answer
TypeError: element(...).then is not a function in Protractor 3.2.1
I was using following code
element(by.xpath("//tf-navpane-item[contains(@class,'tf-state-selected')]//tf-navpane-item-text//*[contains(@class,'ng-binding')]")).then(function(ele){
ele.getText().then(function(txt){
…

Murali Krishna
- 171
- 1
- 11
4
votes
2 answers
Is it possible to resolve promise within the 'executeScript'?
I am trying to write my first test using Protractor+Jasmine for my non Angular application.
I need call API function of my app global instance, get result and compare it in test. One of passed in parameters for this function is a callback which is…

Vrednost
- 43
- 1
- 6
3
votes
0 answers
Disable console logs for GhostDriver, PhantomJS with WebdriverJS
I have been trying to figure out how to disable the annoying console logs when we run phantomjs(ghost driver) with webdriverjs but in vain.
[INFO - 2016-10-09T14:57:15.039Z] GhostDriver - Main - running on port 62381
[INFO -…

Ram Pasala
- 4,931
- 3
- 16
- 26
3
votes
2 answers
implicitlyWait does not work in webdriver javascript
I want to wait for the error message comes out. However, when I use browser.driver.manage().timeouts().implicitlyWait(), but I have to use browser.driver.sleep()
this.getErrorMessage = function () {
var defer = protractor.promise.defer();
…

isian8814
- 191
- 10
3
votes
3 answers
WebdriverJS : driver.manage().logs().get('browser') returns empty array
I have the following mocha test case, I'm trying to print the webdriver logs in the end, but its returning an empty array. The result is the same even when I pass 'browser' as argument to the logs().get(). Can someone please tell me why the logs are…

Oscar
- 96
- 2
- 9
3
votes
1 answer
Understanding Protractor and WebDriverJS control flow
Can someone help me understand how WebDriverJS/Protractor works in this case?
function MyPageObject(buttonElementFinder) {
this.getButtonByIndex = function(index) {
return {
myButton: buttonElementFinder.get(index)
}
}
}
1.…

Ben Aston
- 53,718
- 65
- 205
- 331
3
votes
1 answer
WebDriverJS control flow
Protractor uses WebDriverJS under the hood.
WebDriverJS uses the concept of "control flow" to ensure async tasks are executed in the expected deterministic order.
So the following will work as…

Ben Aston
- 53,718
- 65
- 205
- 331
2
votes
1 answer
Message: function timed out after 5000 milliseconds - Protractor & CucumberJS
cucumberjs --version 1.2.2
protractor --version 4.0.1
Both installed globally via npm
I keep getting this error after upgrading to cucumberJs version above.
Failures:
1) Scenario: Get records from DB
e2e\features\transac.feature:7
Step: Given…

pelican
- 5,846
- 9
- 43
- 67
2
votes
0 answers
cucumber event handlers attached via registerHandler are now passed the associated object instead of an
I upgraded my cucumber to the following:
cucumberjs --version 1.2.2
protractor --version 4.0.1
Both installed globally via npm
And I noticed this message popping up:
cucumber event handlers attached via registerHandler are now passed
the…

pelican
- 5,846
- 9
- 43
- 67
2
votes
1 answer
Protractor e2e test case for download file work fine on chrome but not with firefox and vice versa?
I have a scenario where I need to click on a link which will trigger .CSV file download to a default location(/tmp)and it is working fine on both chrome and firefox browsers but based on multiCapabilities configuration in conf.js, at times it work…

vsathyak
- 73
- 8
2
votes
3 answers
How to connect and re-use an already opened browser window in Protractor
In general, the protractor scripts are executed in a new browser instance with the following capabilities
capabilities: {
'browserName': 'firefox'
}
Is there any snippets or ways to tweak this; so that our scripts make use of an already opened…

Prashanth Sams
- 19,677
- 20
- 102
- 125