end-to-end

Multiple firefox profiles in protractor

半世苍凉 提交于 2019-12-08 19:56:26
Following Configuring multiple capabilities with promises topic. Use case: I have two separate tests that require Firefox to be fired with javascript disabled and local storage disabled . Which means that I need two firefox profiles with javascript.enabled = false and dom.storage.enabled = false desired capabilities/preferences set. I'm using getMultiCapabilities() that was introduced in protractor 1.6. Till this moment, I needed only one custom firefox profile and it worked, here is the configuration: getMultiCapabilities: function() { var deferred = q.defer(); var multiCapabilities = [ {

Click on element - Protractor

巧了我就是萌 提交于 2019-12-08 07:50:48
问题 I have pretty crazy HTML and I am trying to click on element, unfortunately without success. HTML looks like <svg xmlns="http://www.w3.org/2000/svg" version="1.1" viewBox="0 0 5845 3897"> and below that multiple with different ID and so on.. <g id="30_0_80" transform="translate(420,754)" class=""> <path class="fp x80 xab active" d="M307 0 L293 15 L155 120 L87 181 L47 220 L0 277 L0 282 L14 341 L27 379 L32 386 L32 386 L74 425 L123 461 L153 480 L188 500 L238 525 L303 551 L337 563 L340 563 L381

Re-run protractor timeout or failed tests

∥☆過路亽.° 提交于 2019-12-08 06:40:44
问题 I didn't find any reference for the possibility to re-run failed tests (using protractor). Do you know how to do that? It would be great because I have a lot of tests and I don't like to run again all the tests to verify whether the previously failed tests passes or not. Do anyone have experience with it? It would like this: run all tests collect failed tests and run those again (maybe I can set somehow the re-try limit like 2 or 3 times) show the result 回答1: As far as I understand, currently

What are the methods we can use to wait for an angular site to be loaded in order to test it with protractor?

混江龙づ霸主 提交于 2019-12-08 03:32:54
问题 What are the methods we can use to wait for an Angular site to be loaded in order to test it with protractor in order to avoid this error caused by jasmine : A Jasmine spec timed out. Resetting the WebDriver Control Flow ? I'm able to make the login and go to home page that test is passed, but from the second test i have problems of jasmine. 回答1: I have configured this problem by adding this function into my config file : onPrepare: function() { return browser.getProcessedConfig().then

Moving Protractor tests to async/await (leaving selenium control flow)

穿精又带淫゛_ 提交于 2019-12-07 11:46:56
问题 I want to move appart from the selenium control flow in my Protractor tests. Here are the steps and problems I went through so far: 1. Disable it test by test My first idea was to use SELENIUM_PROMISE_MANAGER in order to move from selenium promises to async/await code. Unfortunately, I found no way to put one test to SELENIUM_PROMISE_MANAGER=0 while keeping others to SELENIUM_PROMISE_MANAGER=1 in order to do the migration smoothly. 2. Keep it but use async/await too So I thought about a code

How to simulate ctrl-click or shift-click with webdriver.io?

ぐ巨炮叔叔 提交于 2019-12-07 06:45:25
问题 With webdriver.io I would like to simulate clicks with a modifier like shift or ctrl . The keys() method seems to do something like that but it's not clear to me how to release a modifier key again and it throws an error when I use 16 (key code for shift ) as a parameter for the method - link. Background: In my webpage that I test I have a list of elements that are comparable to files and folders in a file browser and it is possible to select multiple of those with shift and ctrl . This works

Cleaning up Protractor stack trace

℡╲_俬逩灬. 提交于 2019-12-07 06:15:33
问题 The Question: Is it possible to clean up the stack trace and leave only relevant frames eliminating everything Protractor , WebDriverJS and Jasmine specific? The Story: Let's execute this example test: describe("SO test", function () { beforeEach(function () { browser.get("https://angularjs.org"); }); it("should throw a meaningful error", function () { element(by.id("not_found")).click(); }); }); It would fail with a following stacktrace: SO test should throw a meaningful error - Failed: No

How to check checkbox in repeater with protractor

安稳与你 提交于 2019-12-07 04:07:42
I am having difficulty checking a checkbox in an AngularJs repeater with protractor. The model looks like this: environments: [ { name: 'Proof of Concept', checked: false }, { name: 'Non-Production', checked: false }, { name: 'Production', checked: false } ] The view like this: <div class="checkbox" ng-repeat="environment in vm.assessment.environments"> <label><input type="checkbox" ng-model="vm.assessment.environments[$index].checked" ng-click="vm.checkboxChanged()" ng-required="!vm.someChecked">{{environment.name}}</label> </div> Am getting the repeater in protractor like so: this

Re-run protractor timeout or failed tests

牧云@^-^@ 提交于 2019-12-06 15:06:57
I didn't find any reference for the possibility to re-run failed tests (using protractor). Do you know how to do that? It would be great because I have a lot of tests and I don't like to run again all the tests to verify whether the previously failed tests passes or not. Do anyone have experience with it? It would like this: run all tests collect failed tests and run those again (maybe I can set somehow the re-try limit like 2 or 3 times) show the result As far as I understand, currently it is not possible, but there is an open feature request: Feature to execute failed tests only As of sept

Output plugins used by protractor

半世苍凉 提交于 2019-12-06 13:26:00
问题 Protractor 2.0.0. introduces this neat idea of extending protractor with plugins offering several built-in plugins, like ngHint , console or timeline . Currently, I'm trying to make the timeline plugin work and I'd like to see a more verbose output on the console in order to debug the problem. Is it possible to see on the console what plugins are loaded by protractor ? FYI, created an issue: Protractor to report loaded plugins. 回答1: No, I did not find something in the code of the plugins.js.