protractor

How to read elements values and click amout of time

若如初见. 提交于 2020-04-30 11:43:29
问题 So I am currently working on reading elements and a situation can be that it says example on the tag: <div class="stock-controller" style="transition: border-bottom 0.3s ease 0s, opacity 0.3s ease 0s;"> <div class="message"> <svg width="14" height="14" viewBox="0 0 14 14"> <g fill="none" fill-rule="evenodd"> <path fill="#E00751" d="M14 7A7 7 0 1 1 0 7a7 7 0 0 1 14 0z"></path> <path fill="#FFF" fill-rule="nonzero" d="M8.45 7.036L10.414 9 9 10.414 7.036 8.45 5.07 10.414 3.657 9l1.964-1.964L3.5

Protractor + Simple-SSH how to get it sync together in Jasmine

梦想的初衷 提交于 2020-04-30 07:22:19
问题 I'm writing some e2e tests with protractor . During one test I have to physically connect to device with ssh so i decided to use https://www.npmjs.com/package/simple-ssh When I use simple-ssh inside my protractor test's , Jasmine doesn't wait for simple-ssh and it is not working. Is there any possibility to sync that together ? 回答1: I solved that by using done() from Jasmine 2.0 http://www.htmlgoodies.com/beyond/javascript/stips/using-jasmine-2.0s-new-done-function-to-test-asynchronous

How to make automated test scripts in protractor wait, until the page is loaded fully

自闭症网瘾萝莉.ら 提交于 2020-04-29 09:55:23
问题 No, but really! I know this generic question has been asked thousands of times, but there is something more specific that looks feasible to me and thus I want to know how to achieve it The problem I'm testing an angular app with protractor. Inside the app I want to verify that when I click a link I'm being redirected to the right page (non-angular). The problem is that until I reach the page I'm verifying, the url changes 3 times or so (there are multiple redirections happening), so I can't

How to make automated test scripts in protractor wait, until the page is loaded fully

安稳与你 提交于 2020-04-29 09:55:11
问题 No, but really! I know this generic question has been asked thousands of times, but there is something more specific that looks feasible to me and thus I want to know how to achieve it The problem I'm testing an angular app with protractor. Inside the app I want to verify that when I click a link I'm being redirected to the right page (non-angular). The problem is that until I reach the page I'm verifying, the url changes 3 times or so (there are multiple redirections happening), so I can't

Including external script in Angular Protractor test that requires parameters to be passed in

99封情书 提交于 2020-04-18 05:50:27
问题 I would like to include the following script in my Angular protractor test: // Originally from https://ghostinspector.com/blog/simulate-drag-and-drop-javascript-casperjs/ // trimmed down and modified by @kemokid (Martin Baker) to work with Sortable.js /// // Probably not going to work with dragging from one list to another // Call with DOM selectors, eg `triggerSortableDragAndDrop('#drag', '#drop');` // Returns false if unable to start. // callback, if present, will be called with true if

Including external script in Angular Protractor test that requires parameters to be passed in

主宰稳场 提交于 2020-04-18 05:50:26
问题 I would like to include the following script in my Angular protractor test: // Originally from https://ghostinspector.com/blog/simulate-drag-and-drop-javascript-casperjs/ // trimmed down and modified by @kemokid (Martin Baker) to work with Sortable.js /// // Probably not going to work with dragging from one list to another // Call with DOM selectors, eg `triggerSortableDragAndDrop('#drag', '#drop');` // Returns false if unable to start. // callback, if present, will be called with true if

How to debug (protractor) cucumberjs framework 'can not find step definition' problem?

和自甴很熟 提交于 2020-04-18 05:47:29
问题 I have used protractor testing along with cucumberjs framework for a while. I've encountered this 'step definition not found' issue before but it was always a config quick fix until I am playing with this 'cukefarm' library at https://www.npmjs.com/package/cukefarm. The 'cukefarm' use 'protractor-cucumber-framework' (https://github.com/protractor-cucumber-framework/protractor-cucumber-framework) which I also played before. So I start following 'cukefarm' readme page and start building a hello

Protractor-cucumber report: result.json is empty

纵然是瞬间 提交于 2020-04-17 05:44:28
问题 After i follow this question Cucumber HTML report with Protractor to add this line to config file resultJsonOutputFile: 'report.json' , i can generate report.json file but this file is empty after i run my test. ---------------conf.js-------------- exports.config = { allScriptTimeout: 60000, //To set up a timeout for each test executed on Protractor baseUrl: 'http://localhost/wp/index.php', seleniumAddress: 'http://127.0.0.1:4444/wd/hub', //seleniumServerJar: 'selenium-server-standalone-2.48

NoSuchWindowError: Browsing context has been discarded with GeckoDriver Firefox and Protractor(Selenium)

試著忘記壹切 提交于 2020-04-05 05:16:01
问题 I'm trying to run a simple test script using protractor. Environment: Node Version: v9.8.0 Protractor Version: 5.4.1 Angular Version: 1.x Browser(s): Mozilla Firefox 60.1.0 Operating System and Version: HELiOS release 6.10 Here's my protractor config file. exports.config = { specs: ['todo-spec.js'], capabilities: { browserName: 'firefox', marionette : true } }; This is my test script (todo-spec.js) describe('application homepage', function() { it('should open homepage', function() { console

NoSuchWindowError: Browsing context has been discarded with GeckoDriver Firefox and Protractor(Selenium)

白昼怎懂夜的黑 提交于 2020-04-05 05:14:11
问题 I'm trying to run a simple test script using protractor. Environment: Node Version: v9.8.0 Protractor Version: 5.4.1 Angular Version: 1.x Browser(s): Mozilla Firefox 60.1.0 Operating System and Version: HELiOS release 6.10 Here's my protractor config file. exports.config = { specs: ['todo-spec.js'], capabilities: { browserName: 'firefox', marionette : true } }; This is my test script (todo-spec.js) describe('application homepage', function() { it('should open homepage', function() { console