protractor

Angular2 e2e test case with protractor throwing error

孤人 提交于 2019-12-22 01:16:16
问题 I have created my app with angular2-webpack-starter and i have used socket.io with it. I have created one common service to create socket connection and listen its method. this service is used and initialized after user is logged in. When app is running and i execute test case for login, i am checking url with below code : browser.getCurrentUrl().then((url) => { expect(url).toEqual('/dashboard'); }); The issue is when socket is connected its throwing error 'Timed out waiting for Protractor to

Visual Studio 2013 protractor intellisense

自作多情 提交于 2019-12-22 01:15:48
问题 First of all, I am very beginner in using node.js / angualar.js /protractor.js and jasmine.js stuff and I am not from web dev corner at all. But for now, I just want to create some protractor test for an angular app and this is actually working quite fine. But I am wondering if it's possible to get VS2013 intellisense working? I would really appreciate if VS would suggest functions of objects like 'browser.xxx'. I am really stuck with that, looking forward for some hints! thx Florian 回答1: Ill

what does isPresent() in protractor testing actually do?

十年热恋 提交于 2019-12-22 01:14:28
问题 whether the isPresent() provides true only when the element is present in the page or only when the element is visible in the page (while scroll down) If it checks only the element is present in the page, whether there is any other method to provide true only when the element is visible.Kindly provide some input. Edit:1 I had a scrolling problem while loading a page.ie(while loading the page it will scroll down to the middle of my page) So I am using a scroll service which will load the page

How to access input at item level in protractor by model

痴心易碎 提交于 2019-12-22 00:39:23
问题 Not Able to access angular input by protractor by model Have been through post <div ng-repeat="todo in todos"> <!--i can access span--> <span>{{todo.text}}</span> <span>{{todo.address}}</span> <span>{{todo.done}}</span> <!--i CAN'T access input --> <input type="text" ng-model="todo.text"/> <input type="text" ng-model="todo.address"/> <input type="text" ng-model="todo.done"/> </div> Protractor Javasript I Can access Span At Item Level But Cannot access Input var result= browser.findElements

Generate simple html based on jasmine-allure-reporter

老子叫甜甜 提交于 2019-12-22 00:31:01
问题 I'm using jasmine-allure-reporter and the report is simply awesome. Only complaint over the reporter is that I miss option to enable only failed screenshots to be saved and possibility to send it via e-mail. I know that is not possible: How to send an email of allure report? My question is whether I can somehow generate a simple html file with few data based on the allure reports, so that I'll be able to send it via e-mail to relevant people. 回答1: Hope you have added this in your conf file:

nodemailer not sending mail when placed in protractor config afterLaunch() block

早过忘川 提交于 2019-12-21 23:59:50
问题 nodemailer not sending mail when placed in protractor config afterLaunch() block. It sends mail when placed in beforeLaunch() or onPrepare() blocks. Problem: Send HTML mail after protractor test run is complete. The framework generates a HTML file once the execution is complete. nodemailer to read the html content and send email config.js exports.config = { specs: ['../test_lab/execute.spec.js'], capabilities: { browserName: 'chrome', seleniumAddress: 'http://localhost:4444/wd/hub', },

Can I reuse/call existing API in Selenium-Java Framework into the Protractor Framework?

岁酱吖の 提交于 2019-12-21 23:25:24
问题 Please bear with me if this is a silly question. But thought of getting an idea. We have a very sophisticated Selenium Webdriver-Java framework. But now some parts of our application is being implemented in AngularJS. We would like to use protractor for test automation. But we have some API in the existing framework which we would like to reuse. Is there a possibility to do so or do we need to re-write all the existing API in protractor? Thanks 回答1: Not probably the answer you are looking for

Angular IO Protractor tests with mocked back-end

强颜欢笑 提交于 2019-12-21 23:23:54
问题 I wish to perform some tests in my Angular IO app using Protractor, however, I was unable to find any solution that allows me to mock back-end services. The only solutions I've found were all to Angular JS. Can anyone point me in the right direction, be it 3rd party libraries with the above mentioned functionality or some native stuff I could use? Thank you very much for your time 来源: https://stackoverflow.com/questions/55924287/angular-io-protractor-tests-with-mocked-back-end

Protractor: Click on SVG element not work

孤者浪人 提交于 2019-12-21 23:18:13
问题 I am testing an angularjs App using protractor. I need to test the click on an SVG element. Protractor can find the element, it can run the click on the element, but after the click nothing happens. It should change page after the click. The code is el=element(by.xpath('(//*[local-name()="g" ]//*[local-name() = "rect"])[1]')) browser.actions().mouseMove(el.getWebElement()).click().perform(); 回答1: I agree with what @alecxe suggested in his comment. You should be calling click() on the element

Message: function timed out after 5000 milliseconds - Protractor & CucumberJS

假如想象 提交于 2019-12-21 21:03:06
问题 cucumberjs --version 1.2.2 protractor --version 4.0.1 Both installed globally via npm I keep getting this error after upgrading to cucumberJs version above. Failures: 1) Scenario: Get records from DB e2e\features\transac.feature:7 Step: Given I am logged in as "username" with "password"- e2e\features\transac.feature:8 Step Definition: e2e\steps\loginSteps.js:17 Message: function timed out after 5000 milliseconds 1 scenario (1 failed) 1 step (1 failed) 0m06.608s Please note I included my env