e2e-testing

Protractor failed to start test with firefox

佐手、 提交于 2019-12-08 06:56:29
I can not start the test with protractor on firefox version 56.0.1. my protractor version is 5.1.2 exports.config = { allScriptsTimeout: 11000, specs: [ './e2e/**/*.e2e-spec.ts' ], capabilities: { 'browserName': 'firefox' }, directConnect: true, baseUrl: 'http://localhost:4444/', framework: 'jasmine', jasmineNodeOpts: { showColors: true, defaultTimeoutInterval: 30000, print: function() {} }, }; this is the error: [00:02:20] I/launcher - Running 1 instances of WebDriver [00:02:20] I/direct - Using FirefoxDriver directly... [00:02:27] E/launcher - Unable to parse new session response: {"value":

How to wait for a event to be processed in a protractor end to end test?

倾然丶 夕夏残阳落幕 提交于 2019-12-08 03:16:46
问题 I have very simple AngularJs 1.4.8 Front-End: When the form is filled and the OK button is pressed the new person is added to the table. The form is in the addingPersonController and the table is in the allPersonsController , both are childs under the masterController . When a user is added( OK clicked) the following happens: a POST request is sent to the server in order to add the new person. a personAddedEvent is emitted with $emit from the addingPersonController to the masterController the

Mocking the date in Protractor

笑着哭i 提交于 2019-12-08 03:06:04
问题 I am writing a suite of end to end tests for my angular (4) application, using protractor. My backend is configured to connect to an exact replica of the production database, but filled with dummy data. A big part of my front end, is correctly displaying historic data. Currently, there is a certain period which has the data I want to display. However, obviously in a weeks time, my "Weekly" view will display all data as 0. Is it possible to trick protractor into thinking the date is within the

Setting timezone in Protractor e2e tests

隐身守侯 提交于 2019-12-08 02:51:50
问题 I have some Protractor e2e tests in which I deal with timezone. On my local machine they pass, on Appveyor they don't. I found out it's a timezone setting issue (different settings on Appveyor). Is there a way to set the timezone at the start of the test suite and bring it back the old one at the end? I tried this solution (so please don't mark this as duplicate): Set browser timezone in a Protractor test which I found to be a very ugly workaround. Anything prettier? 回答1: You could use

Expect: does not get the actual value

两盒软妹~` 提交于 2019-12-07 22:37:14
问题 I faced with very strange problem. I had a set of tests which I run daily on Jenkins and without any noticeable changes some asserts(expects) started fail. THe strange thing here is that they fails ONLY if I execute tests from Jenkins on Browserstack. Locally everything just fine, locally on browserstack everything is fine, on saucelabs everything is fine. I have 3 it() blocks with similar expects: value1 = $('.someclass'); value2 = .. value3 = .. expect(value1.getText()).toContain('tratata')

How can you interact with the Windows desktop when using TestCafe

痞子三分冷 提交于 2019-12-07 20:54:16
问题 I need to use TestCafe to perform actions within our Electron app, however I also need to perform actions on the Windows desktop (e.g. click taskbar, launch other apps). Since TestCafe can only interact with what is within the browser window, I have attempted to use Appium to essential run TestCafe (calling the commandline from C#) and then performing the Windows desktop actions through WinAppDriver however this feels like a kludge. Are there other methods of arranging this or a framework

Cypress test: is .contains() equivalent to should('contain')?

倖福魔咒の 提交于 2019-12-07 08:30:40
问题 Is this: cy.get('[name=planSelect]').contains(dummyPlan) equivalent to this: cy.get('[name=planSelect]').should('contain', dummyPlan) And if so, which is preferred? The first is more of an implicit assertion, but it's shorter and cleaner to my mind. Follow-up question: After looking around to see how best to select elements for e2e testing I found that the Cypress docs recommend using data-cy attributes. Is there a reason this would be better than just adding name attributes to the markup?

Handling Hover over menu's using Cypress

ぃ、小莉子 提交于 2019-12-07 05:41:59
问题 I recently stumbled upon the e2e tool - Cypress.io. I'm currently doing a POC for the firm I work with for e2e testing of a react app. It has a hover over menu like most of the web apps have now. An example : URL : Fmovies I was trying to click a menu item from this hover over but the test fails saying that the display is set to none . In Selenium, we use the moveElement approach to go to this element, and then do whatever we need to do. However, I'm failing to do so using Cypress.

You seem to not be depending on “@angular/core”. Typescript

自闭症网瘾萝莉.ら 提交于 2019-12-07 03:13:38
问题 I'm trying to run a command at npm start, but I get the message: "You seem to be not dependent on" @angular/core ". This is an error. What could be the reason? As it writes in the console: npm @angular/core -v it gets 5.4.2 My package.json "dependencies": { "@angular/animations": "^4.4.3", "@angular/common": "^4.4.3", "@angular/compiler": "^4.4.3", "@angular/core": "^4.4.3", "@angular/forms": "^4.4.3", "@angular/http": "^4.4.3", "@angular/platform-browser": "^4.4.3", "@angular/platform

Protractor tests failing in second run for ng-reflect attribute

时光怂恿深爱的人放手 提交于 2019-12-06 21:09:26
I have a bunch of Protractor tests for for e2e of a web application. There are a lot of input boxes , and a majority of them have ng-reflect-name attribute generated due to the underlying Angular4 code. Here is an example HTML snippet <input _ngcontent-c6="" class="input ng-untouched ng-pristine ng-invalid ui-inputtext ui-corner-all ui-state-default ui-widget" formcontrolname="email" pinputtext="" placeholder="Enter Email Address" spellcheck="false" type="text" ng-reflect-name="email"> My issue is regarding the use of locator in this. If I use this code for this specific input box - element(by