angularjs-e2e

Element is not clickable in Protractor

微笑、不失礼 提交于 2019-12-13 04:26:36
问题 I am facing issue while interacting with any element in a modal popup. I am using ChromeDriver 2.46 and all tests which involves modal popup fails on Chrome 74. I get below error element is not clickable. Other element would receive the click I have tried with scrollToTop , scrollToElement and visibilityOf but nothing worked. Has anyone faced similar issue? 回答1: Attach you html, and full error stack Meanwhile here is my assumption which is 90% likely what your problem is Lets assume your html

Angularjs - simulate touch event in Protractor e2e test

允我心安 提交于 2019-12-12 09:37:12
问题 I use Protractor with Jasmine for my mobile Angularjs app. I want to test a touch event (touchStart / touchEnd etc...) on a particular element. Something like: it('should play video', function(){ var poster = by.css('.video-poster'); element(poster).??? //Simulate touch event here }); 回答1: Update: Since Protractor returns a Selenium element finder not an angular element, you'll have to use the executeScript() function to call a JavaScript method on it, like: var poster = element(by.css('

Protractor - beforeAll and afterAll undefined

对着背影说爱祢 提交于 2019-12-12 09:24:44
问题 I am using Protractor with jasmine. Protractor version is 3.2.2 , I found this using the command protractor --version . How to find the jasmine version used by protractor. When I read the updgrade doc, I couldn't find the steps to upgrade jasmine, all I found is to add jasmine2 in configuration file. My configuration file looks like this exports.config = { framework: 'jasmine2', .... } But I still was not able to use beforeAll and afterAll . Am I missing anything here. Since beforeAll and

Protractor - switch tabs error

拟墨画扇 提交于 2019-12-11 12:53:34
问题 I'm trying to switch to another tab and use controls on that new tab and I get this error: UnknownError: null value in entry: name=null this is the test (the important part): element(by.repeater("project in projects").row(1).column("{{project.name}}")).click().then(function(){ flow.timeout(5000); $('.project-data a').click().then(function () { browser.getAllWindowHandles().then(function (handles) { flow.timeout(5000); browser.switchTo().window(handles[1]).then(function () { browser.sleep(5000

Get row number using text in the row in Protractor

我是研究僧i 提交于 2019-12-11 09:52:59
问题 I have the table structured below <table class="table"> <thead> <tr> <th class="checkbox-column"></th> <th class="main-column main-column--checkbox">Name</th> </tr> </thead> <tbody ng-repeat="(a, b) in tests" class="ng-scope" style=""> <tr class="panel__sub-header"> <td> <input name="item-checkbox" ng-click="toggleSelectAll(a)" type="checkbox"> </td> <td colspan="4"> <h4 class="ng-binding">ROW2</h4> </td> </tr> <tr ng-repeat="test in testData" ng-class-odd="'odd'" ng-class-even="'even'" class

How do I use resume() in Angular JS e2e testing?

柔情痞子 提交于 2019-12-11 06:16:44
问题 I am going through step three of this angular js tutorial. http://docs.angularjs.org/tutorial/step_03 The very last task is to "Add a pause() statement inside of an end-to-end test and rerun it." I was able to add pause() and the test paused as it should. The question is, how to resume? The documentation for pause() here indicates calling resume() in the console or clicking the resume link in the Runner UI, but I can't seem to figure out how to call resume from the console, nor can I find the

btstrpd Error when testing AngularJS app with Protractor

早过忘川 提交于 2019-12-10 10:02:39
问题 I’m currently trying to do some E2E testing of an AngularJS app using Protractor and I’m stuck with the btstrpd error. I'm new to AngularJS (I'm just the test automation guy in the project), so I’d really appreciate any pointers on how to make it run. Basically I just copied and pasted the sample configuration and specification from the Protractor tutorial and adapted it for my project: // conf.js exports.config = { seleniumAddress: 'http://localhost:4444/wd/hub', specs: ['spec.js'],

Isolation of actions and tests

牧云@^-^@ 提交于 2019-12-08 11:06:42
问题 I try to refactor my code. I know that if I have several expectations they should be isolate in 'it'. I try to understand how I can write instead this: describe('my scenario should make', function () { var config = browser.params; var url = config.listOfReferencesUrl, grid, numberField; it('test1', function () { browser.get(url); browser.executeScript("icms.go('WEB_INQ_PROC', 'InquiryList', null, 0)"); grid = psGrid(by.css("table[class='n-grid']")); numberField = grid.getQuickFilter(1);

Timed out waiting for Protractor to synchronize with the page after 11 seconds - Protractor

◇◆丶佛笑我妖孽 提交于 2019-12-08 09:06:59
问题 I have a login form, and I want to set input to both inputs, but the test doesn't go through in Chrome, Safari, but with Firefox it works. Initially I have a $http request and it is done, and as I know, protractor continues when $http is done, so this should not be the issue, or is it? Error: Uncaught exception: Timed out waiting for Protractor to synchronise with the page after 11 seconds. Please see https://github.com/angular/protractor/blob/master/docs/faq.md This is my test: describe('ADM

AngularJS: how to invoke event handlers and detect bindings in tests

时光总嘲笑我的痴心妄想 提交于 2019-12-08 02:20:23
问题 I want to write unit and e2e tests for various custom angularjs directives that add javascript event bindings to the elements they are attached to. In tests, it's easy enough to simulate click and dblclick events using jQuery methods. element("#id").click(); However, I am also binding mouseover, mouseout and contextmenu events, and haven't found a way to invoke these in e2e tests. The code below shows the approach I am taking. it('should show a context menu when the user right clicks on a