protractor

Protractor - how to reuse the same spec file for different tests

巧了我就是萌 提交于 2020-01-01 18:17:12
问题 In my Protractor conf.js file, I'd like to re-use the same spec files multiple times; however, it's seems to not be possible. Some background: We are reading test cases from a JSON file, launching reports, then testing grid results and various DOM elements. All reports have the same format. The primary differences lie in the report titles, data columns, actual data results, etc. So in my conf.js file, ideally I'd like to re-use the same spec files multiple times - but my understanding is that

Intellij Idea hangs when debugging protractor

百般思念 提交于 2020-01-01 17:04:52
问题 I have problem similar to one mentioned in this question. I'm trying to debug protractor tests in IntelliJ Idea. After I set configuration for Node.js and press Run all tests run properly, but after clicking Debug , I see only: "C:\Program Files (x86)\JetBrains\IntelliJ IDEA 14.0\bin\runnerw.exe" "C:\Program Files\nodejs\node.exe" --debug-brk=65500 --nolazy --debug node_modules\protractor\lib\cli.js protractor.conf.js debugger listening on port 65500 [launcher] Running 2 instances of

Protractor: HTTP Response Testing

社会主义新天地 提交于 2020-01-01 16:42:09
问题 I'm using Protracotr for e2e testing. I want to test response from HTTP in protractor. Basically: I have running some NodeJS server. I want to send request to this server Receive some JSON data Parse those data Check if they are correct I'm using "http" NODEJS Lib to make http calls GET+POST. var http = require('http'); describe("Some test", function() { function httpGet(siteUrl) { http.get(siteUrl, function(response) { response.setEncoding('utf8'); response.on("data", function(chunk) {

Can you use Protractor and Appium together to test hybrid apps?

允我心安 提交于 2020-01-01 14:56:11
问题 Here is my scenario. I have a website which is built on top of Angular JS. I am able to automate the website using protractor. However there are certain actions which when performed on website are reflected in Android and IOS devices. Here's what I want to achieve. Run my tests on website like I normally do but I want to fire commands to test the android and ios app also /* For eg: 1. Change password on website using protractor 2. Launch android app and check if the password has been changed

Accessing $http data in Protractor / E2E tests (AngularJS)

谁都会走 提交于 2020-01-01 12:24:01
问题 I have a bunch of Unit tests that are going well, and I've started to add Protractor E2E tests to my project. I'm doing okay testing interactive elements on the page, but I'm having trouble testing for certain data being sent out of the browser. For instance, I want to see if clicking a certain button produces a POST to a certain endpoint. I have protractor set up using the following: /*globals global*/ module.exports = function() { 'use strict'; var chai = require('chai') , promised =

Install Latest Version of Firefox on Travis And Run with Protractor

隐身守侯 提交于 2020-01-01 12:23:21
问题 Travis installs Firefox 31.0esr by default, but we want to always use the latest version. The reference here says it should be pretty straight forward, but it doesn't seem to actually install, rather it just seems to download the tar file. Protractor still uses Firefox version 31.0esr when it runs. travis.yml addons: firefox: "latest" protractor.conf.js capabilities: { 'browserName': 'firefox' } Logs: Initial Firefox install still happens: [34m[1mInstalled Firefox version[0m firefox 31.0esr .

Clicking on <a> in a ng-repeat table. Protractor E2E-test angular

假如想象 提交于 2020-01-01 11:02:14
问题 I have this table <table class="table"> <thead> <tr> <th class="col-sm-5">Actions</th> <th class="col-sm-5">Title</th> <th class="col-sm-2">Saved</th> </tr> </thead> <tbody> <tr ng-repeat="calc in calculations"> <td> <a class="btn btn-default btn-sm" ng-click="removeCalculation(calc.calcId)"> <i class="fa fa-trash-o"></i> </a> <a class="btn btn-default btn-sm" href="#"> <i class="fa fa-bar-chart-o"></i> </a> <a class="btn btn-default btn-sm" ng-href="#/user/{{user.userId}}/calculation/{{calc.

Clicking on <a> in a ng-repeat table. Protractor E2E-test angular

半世苍凉 提交于 2020-01-01 11:01:24
问题 I have this table <table class="table"> <thead> <tr> <th class="col-sm-5">Actions</th> <th class="col-sm-5">Title</th> <th class="col-sm-2">Saved</th> </tr> </thead> <tbody> <tr ng-repeat="calc in calculations"> <td> <a class="btn btn-default btn-sm" ng-click="removeCalculation(calc.calcId)"> <i class="fa fa-trash-o"></i> </a> <a class="btn btn-default btn-sm" href="#"> <i class="fa fa-bar-chart-o"></i> </a> <a class="btn btn-default btn-sm" ng-href="#/user/{{user.userId}}/calculation/{{calc.

Protractor: clear browsing data completely

偶尔善良 提交于 2020-01-01 10:29:42
问题 I'm looking for a way to completely delete all cookies, session/state cookies, storage, etc. using Protractor. Basically, I want to accomplish the same thing in Protractor as a user would by going to Settings -> Clear browsing data. browser.manage().deleteAllCookies() does not delete httpOnly cookies. And since JavaScript can't touch httpOnly cookies, I can't use JavaScript. I know I could restart the browser in Protractor, but prefer not to go this route. Any suggestions? 回答1: This answer by

Protractor: clear browsing data completely

那年仲夏 提交于 2020-01-01 10:28:12
问题 I'm looking for a way to completely delete all cookies, session/state cookies, storage, etc. using Protractor. Basically, I want to accomplish the same thing in Protractor as a user would by going to Settings -> Clear browsing data. browser.manage().deleteAllCookies() does not delete httpOnly cookies. And since JavaScript can't touch httpOnly cookies, I can't use JavaScript. I know I could restart the browser in Protractor, but prefer not to go this route. Any suggestions? 回答1: This answer by