protractor

Protractor How do I Start the Selenium Server on a Jenkins Build

﹥>﹥吖頭↗ 提交于 2020-08-26 08:39:59
问题 Some Background I've been reading up about Protractor Tests running on a Jenkins Server. I'm still a little confused as to how you can start the selenium server on a Jenkins Build. Since you need to first run the following 2 commands webdriver-manager update webdriver-manager start and then you need to run the appropriate protractor command protractor conf.js The Problem Once you've run the first 2 commands, you essentially need to leave that command window open for the server to continue to

Keep getting TypeError: config.suite.split is not a function when running regression tests

江枫思渺然 提交于 2020-08-11 03:42:38
问题 I got the following error when running a sample regression test: TypeError: config.suite.split is not a function Here is the the configuration file. It looks ok but I must have missed something but I can't honestly find what it could be. Configuration.js file (this was working few days ago) var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter'); exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['PageObjectLocator2.js'], capabilities: { browserName:

Keep getting TypeError: config.suite.split is not a function when running regression tests

ⅰ亾dé卋堺 提交于 2020-08-11 03:42:37
问题 I got the following error when running a sample regression test: TypeError: config.suite.split is not a function Here is the the configuration file. It looks ok but I must have missed something but I can't honestly find what it could be. Configuration.js file (this was working few days ago) var Jasmine2HtmlReporter = require('protractor-jasmine2-html-reporter'); exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['PageObjectLocator2.js'], capabilities: { browserName:

Click an element if another element contains a specific text. Automated Test with Protractor

折月煮酒 提交于 2020-08-08 05:15:18
问题 I need to check which one of 3 elements contains the text "10%" but I am not sure I am getting correctly the text of the element. When I run the code I am not getting errors but the if condition is always false(also when it should be true). My javascript code inside the spec: await driver.wait(until.elementIsVisible(await driver.findElement(By.css("tr:nth-child(1) .font-weight-bold-light > span"))), 30000) await driver.wait(until.elementIsVisible(await driver.findElement(By.css("tr:nth-child

Fail loading file protractor - Failed: script timeout: result was not received in 11 seconds

本秂侑毒 提交于 2020-08-07 06:01:00
问题 I got an error trying to execute a test to upload a file with protractor, my code is this one it('it should be possible to upload a file', function() { browser.get(buildUrl('')); popupEnvironment(); element(by.id("menu-transmission")).click(); element(by.id("menu-child-send-datafiles")).click(); expect(element(by.id("drop-zone")).isPresent()).toBeTruthy('the drag and drop zone should be present'); expect(element(by.id("drop-zone")).isDisplayed()).toBeTruthy('the drag and drop zone should be

Fail loading file protractor - Failed: script timeout: result was not received in 11 seconds

只谈情不闲聊 提交于 2020-08-07 05:59:05
问题 I got an error trying to execute a test to upload a file with protractor, my code is this one it('it should be possible to upload a file', function() { browser.get(buildUrl('')); popupEnvironment(); element(by.id("menu-transmission")).click(); element(by.id("menu-child-send-datafiles")).click(); expect(element(by.id("drop-zone")).isPresent()).toBeTruthy('the drag and drop zone should be present'); expect(element(by.id("drop-zone")).isDisplayed()).toBeTruthy('the drag and drop zone should be

How to catch the <mat-error> error message text content using Protractor

佐手、 提交于 2020-07-22 05:53:09
问题 I'm dealing with below element and having trouble with getting the error message text in to a variable. <mat-error _ngcontent-c16="" class="mat-error ng-star-inserted" id="error-email-required" role="alert" style=""> Email is a required field </mat-error> Catching the element is straight forward. var emailReqiredLabel = element(by.id('error-email-required')); I tried below options but all printing as >> visible error message is : [object Object] var errormsg = emailReqiredLabel.getText()

Simulate drag and drop of file to upload in Protractor

牧云@^-^@ 提交于 2020-07-18 14:01:50
问题 I want to test file upload, by dragging file to the drop zone in the page, however I can't find a way to simulate file dragging from the desktop folder. The only way I managed to found is the following one - desktop.browser.actions().dragAndDrop(elem,target).mouseUp().perform();(Protractor) However as far as I can understand, it drags only css element. 回答1: This is a working example to simulate a file drop from the desktop to a drop area: const dropFile = require("./drop-file.js"); const EC =