protractor

webdriver-manager update throwing Error: connect ETIMEDOUT

情到浓时终转凉″ 提交于 2021-02-20 19:30:09
问题 I'm getting ETIMEDOUT error while installing webdriver-manager updated . Find the error details as below: C:\Users\....> webdriver-manager update webdriver-manager: using global installed version 12.0.6 events.js:160 throw er; // Unhandled 'error' event ^ Error: connect ETIMEDOUT XX.XXX.XX.XXX:XXX at Object.exports._errnoException (util.js:1018:11) at exports._exceptionWithHostPort (util.js:1041:20) at TCPConnectWrap.afterConnect [as oncomplete] (net.js:1086:14) Also when I tried to ping the

Failed loading config.ts due to import protractor

筅森魡賤 提交于 2021-02-19 05:48:22
问题 I am trying to start a new protractor project to test an angular site. I installed node.js, typescript, protractor globally and jasmine. I go to the project folder and do webdriver-manager update . Then I do webdriver-manager start . I also build the config.ts using tsc config.ts . Everything works fine until i try protractor config.ts . Here i will provide my config.ts and my package.json. { "name": "protractortests", "version": "1.0.0", "description": "Automated tests for a game platform",

Log console errors using protractor

*爱你&永不变心* 提交于 2021-02-18 13:57:37
问题 I am trying to log console errors in protractor like this log output is in format { level: { value: 900, name: 'WARNING' }, message: 'message', timestamp: 1442090739962, type: '' }, { level: { value: 800, name: 'INFO' }, message: 'message', timestamp: 1442090740723, type: '' }, { level: { value: 1000, name: 'ERROR' }, message: 'error message', timestamp: 1442090740723, type: '' }, I want to catch only errors so i have written test like this it('it should be detect console errors', function()

Protractor - Find all elements and loop length of found elements and click button

北慕城南 提交于 2021-02-17 05:36:07
问题 So I have been trying to figure out on how to click a button x times depending on how many find All elements are. Meaning if there is 3 elements that is found by the same classname then we loop 3 times which should click the button 3 times. I have done something like this: (New update, check edit post at the bottom) Usually the element.all(by.className('btn btn-remove btn-outlined')).getText() is 3 but can be changed to 6 and random numbers so my idea was to read first how many btn btn-remove

Protractor - Find all elements and loop length of found elements and click button

被刻印的时光 ゝ 提交于 2021-02-17 05:35:09
问题 So I have been trying to figure out on how to click a button x times depending on how many find All elements are. Meaning if there is 3 elements that is found by the same classname then we loop 3 times which should click the button 3 times. I have done something like this: (New update, check edit post at the bottom) Usually the element.all(by.className('btn btn-remove btn-outlined')).getText() is 3 but can be changed to 6 and random numbers so my idea was to read first how many btn btn-remove

How to select specific data in dynamic table using protractor?

拥有回忆 提交于 2021-02-11 15:42:49
问题 I am trying to automate some scenarios using protractor where we need to verify whether the data is updating in dynamic table. Please find below HTML Code: enter image description here Table in page: enter image description here 回答1: It can be done by verifying that element is present in the DOM with the added Group ID or Group Name. For Group ID: element(by.xpath("*//table//tbody//tr//td[1]//p[text()='Amanda Test Group']")).isDisplayed() For Group name: element(by.xpath("*//table//tbody//tr/

Protractor option does not work in package.json script

北城以北 提交于 2021-02-11 12:14:15
问题 The following command works as expected: protractor --cucumberOpts.tags='not @tag1' conf.js Now I want to add this command as a script to package.json like this: "scripts": { "my-script": "protractor --cucumberOpts.tags='not @tag1' conf.js" } Running the command npm run my-script gives me the following error: Usage: protractor [configFile] [options] configFile defaults to protractor.conf.js The [options] object will override values from the config file. See the reference config for a full

Protractor Async/Await Error: Unhandled promise rejection

时光总嘲笑我的痴心妄想 提交于 2021-02-11 07:21:04
问题 I'm refactoring my framework with protractor Async/Await to avoid sloppy browser.sleep() all over the code base. Following are the steps of test followed by code as an example: Opens ChromeBrowser Logins with the credentials Selects a customer Clicks on "Manage Customer" button. Could you please help me with below Error: Report destination: target\e2e\screenshots\my-report.html [12:42:21] I/launcher - Running 1 instances of WebDriver [12:42:21] I/hosted - Using the selenium server at http:/

Protractor Async/Await Error: Unhandled promise rejection

本秂侑毒 提交于 2021-02-11 07:21:03
问题 I'm refactoring my framework with protractor Async/Await to avoid sloppy browser.sleep() all over the code base. Following are the steps of test followed by code as an example: Opens ChromeBrowser Logins with the credentials Selects a customer Clicks on "Manage Customer" button. Could you please help me with below Error: Report destination: target\e2e\screenshots\my-report.html [12:42:21] I/launcher - Running 1 instances of WebDriver [12:42:21] I/hosted - Using the selenium server at http:/

Protractor - Check if a radio-button is checked or not

点点圈 提交于 2021-02-11 04:49:06
问题 So I have this problem where I run a protractor/selenium test and sometimes a radio-button is already checked during the test and sometimes its not. etc: <div id="TRUCK" class="radio-item checked" data-gtm="truck"> or <div id="TRUCK" class="radio-item" data-gtm="deliveryOpt-truck"> where you can see the class sometimes have the "checked" init and sometimes not. What I am trying to do solve is that I want to make a function that clicks IF the radio-button is not checked and if its already