protractor

How to create Protractor reports with Jasmine2

女生的网名这么多〃 提交于 2020-02-20 06:28:24
问题 I have very recently started to use Protractor lib to test angularjs site.I tried to use below 2 libs to create HTML reports but in both cases I got the error https://www.npmjs.com/package/protractor-jasmine2-html-reporter and https://www.npmjs.com/package/protractor-jasmine2-screenshot-reporter. Platform:- Windows 7 Installation cmd:- npm install -g protractor-jasmine2-html-reporter Error: Cannot find module 'protractor-jasmine2-html-reporter' Config.js var Jasmine2HtmlReporter = require(

Control windows or file explorer to upload files in protractor

∥☆過路亽.° 提交于 2020-02-16 09:27:28
问题 I am trying to upload files in my protractor E2E test. Googling a bit I ended up using robotJS. Unfortunately , the installation of robotJS is failing. Is there any other way to get my files uploaded. Steps: Click on upload button File explorer opens. Enter the path click on upload. I tried using FileDetector and below is the code: let fileToUpload = 'testfolder'; let absolutePath = path.resolve(__dirname, fileToUpload); await browser.setFileDetector(new remote.FileDetector()); $('input[type=

How to check if an element is not clickable with Protractor?

≡放荡痞女 提交于 2020-02-03 04:18:18
问题 It's trivial to test if an element is clickable with Protractor, but I'm stuck scratching my head trying to figure out how to check if an element is not clickable. I've attempted to wrap the click function in a try/catch so that when an error is thrown when trying to click it should catch it and let the test pass; however, this does not work. Here is my code for the method that does the check: return this.shouldSeeDisabledFunds() .then(function() { var clickable = true; try { fundsElem.first(

Cannot return string from value of element in protractor test

痴心易碎 提交于 2020-02-02 03:44:27
问题 So I'm trying to get a string value to be returned from the value of an element on the resolution of this promise. I want to pass a raw string value to another function that I'm building inside a protractor test. This is the element: <div style='hidden' > <input id="group-sendgrid-hidden-input" ng-model='groupCode' value='dangyo' > </div> I'm looking for a way to get at either the model value or the attribute value (either will work). Model value might even be better. This is my attempt to

Angular2 build error TS2305

两盒软妹~` 提交于 2020-01-26 04:06:09
问题 I tried to run build on an angular2 project, inside a .NET project (this part doesn't matter a lot i think). I encounter the following error when building my project. Already tried to delete typings directory and then do typings install with no change. Package.json { "name": "angular2project", "version": "1.0.0", "license": "MIT", "angular-cli": {}, "scripts": { "start": "ng serve", "lint": "ng lint", "test": "ng test", "pree2e": "webdriver-manager update", "e2e": "protractor", "clean":

This version of ChromeDriver has not been tested with Chrome version 79 error running protractorE2E tests with ChromeDriver Chrome Selenium

匆匆过客 提交于 2020-01-24 13:24:26
问题 Those are my settings: .gitlab-ci.yml image: node stages: - test tests: stage: test before_script: # Add Google Chrome to aptitude's (package manager) sources - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee -a /etc/apt/sources.list # Fetch Chrome's PGP keys for secure installation - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - # Update aptitude's package sources - apt-get -qq update -y # Install latest Chrome stable, Xvfb packages -

This version of ChromeDriver has not been tested with Chrome version 79 error running protractorE2E tests with ChromeDriver Chrome Selenium

别等时光非礼了梦想. 提交于 2020-01-24 13:24:26
问题 Those are my settings: .gitlab-ci.yml image: node stages: - test tests: stage: test before_script: # Add Google Chrome to aptitude's (package manager) sources - echo "deb http://dl.google.com/linux/chrome/deb/ stable main" | tee -a /etc/apt/sources.list # Fetch Chrome's PGP keys for secure installation - wget -q -O - https://dl-ssl.google.com/linux/linux_signing_key.pub | apt-key add - # Update aptitude's package sources - apt-get -qq update -y # Install latest Chrome stable, Xvfb packages -

Protractor error selenium spring boot

核能气质少年 提交于 2020-01-24 01:10:15
问题 vegan@vegan:~/hb-productupload/gateway/src/test/javascript$ gulp protractor [15:47:24] Working directory changed to ~/hb-productupload/gateway [15:47:51] Using gulpfile ~/hb-productupload/gateway/gulpfile.js [15:47:51] Starting 'protractor'... Using ChromeDriver directly... [launcher] Running 1 instances of WebDriver /home/vegan/hb-productupload/gateway/node_modules/selenium-webdriver/http/index.js:174 callback(new Error(message)); ^ Error: ECONNREFUSED connect ECONNREFUSED 127.0.0.1:47841 at

Protractor version 5.2.0 - How to pass a specific key (Ex: TAB) as a parameter in sendkeys()?

﹥>﹥吖頭↗ 提交于 2020-01-24 00:18:12
问题 I wanted to pass the key names as a parameter, to make it more reusable instead of hard coding. Just something like below function Keyboardaction(keys) { return browser.actions().sendKeys(protractor.Key.(keys)).perform(); } Keyboardaction(TAB); Can anyone help on the same 回答1: You can do this function Keyboardaction(keys) { return browser.actions().sendKeys(protractor.Key[keys]).perform(); } Keyboardaction("TAB"); but then you'll want to pass multiple keys, or chords, send it to particular

Get a specific element from an ElementArrayFinder in protractor based on the text of getText()

三世轮回 提交于 2020-01-23 15:38:25
问题 I'm trying to get the specific ElementFinder from an ElementArrayFinder based on the text of the desired element. For example, suppose I have the following HTML snippet provided by an Angular2 app: <ul id="names"> <li><span>Adam</span> <span class="ids">ID: 1</span></li> <li><span>Becky</span> <span class="ids">ID: 2</span></li> <li><span>Chris</span> <span class="ids">ID: 3</span></li> </ul> And I want to select the second li using the name "Becky". So I have the following function: /** *