e2e-testing

React Native + Appium iOS elementByAccesibilityId.text()

一曲冷凌霜 提交于 2019-12-10 10:42:07
问题 I'm writing tests for React Native using Appium + Jest for both Android and iOS. Here's my React Native element: <Text accessibilityLabel={'emailError'}>Invalid email</Text> Here's the Promise chain I created to extract the value of a React Native Text element: driver.elementByAccessibilityId('emailError') .then(error => error.text()) .then(errorText => expect(errorText).toBe('Invalid email')) On Android, this test passes. On iOS, this test fails, and errorText === 'emailError' . Why is this,

Does testcafe support testing of rest api

谁说胖子不能爱 提交于 2019-12-10 10:39:09
问题 Tests hang in the testcafe browser when you try to test a rest api url directly. I am trying to run a test against my rest API endpoint using request hooks, but when I run the test from the command line, the browser opens the API endpoint and loads it and hangs. The test doesn't pass or fail and hangs. The rest API endpoint just returns a JSON response. const logger = RequestLogger('https://example.com/search/suggestions?search=testkeyword'); fixture `test` .page('https://example.com/search

Is there a way in TestCafe to validate Chrome network calls?

ぐ巨炮叔叔 提交于 2019-12-10 10:28:08
问题 I have a test case where I need to navigate to a webPage and validate the network calls in chrome browser for that page. Ideally, I would take them in a variable and filter them for certain analytics related calls and validate their values. This can be done through chrome capabilities in Selenium. See doc here: http://chromedriver.chromium.org/logging/performance-log but I am trying to do this through testCafe? I came across this documentation: https://devexpress.github.io/testcafe

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'],

Protractor E2E angular “angular could not be found on the window”

a 夏天 提交于 2019-12-09 14:16:33
问题 I have a strange error after running my tests in angular project Error: Error while waiting for Protractor to sync with the page: "angular could not be found on the window" . My Protractor configuration looks like this: require('coffee-script').register(); exports.config = { seleniumServerJar: './node_modules/protractor/selenium/selenium-server-standalone-2.39.0.jar', seleniumAddress: 'http://localhost:4444/wd/hub', capabilities: { browserName: 'chrome' //'chromeOptions': { // 'args': ['-

Cypress pipe console.log and command log to output

江枫思渺然 提交于 2019-12-09 00:32:22
问题 Is it possible to redirect or capture Cypress browser log and command log to output? I read some Cypress github issues on this topic. But I don't know how to make it work. Basically, I want to capture all the Cypress GUI command logs in the headless non-GUI mode. If I can include browser console log will be even better. The purpose is to understand what happened when a test fails. I use teamcity as ci. Here is an example of my build log. I want to see all the command log here too. Actually,

Viewing outstanding requests

假如想象 提交于 2019-12-08 19:38:29
Is there any way to view what requests Protractor are waiting on? I'm trying to debug flaky state testing, but it is hard to tell whether a button didn't trigger a response or if Protractor didn't bother to wait. TL;DR: How can I view the remaining promises on the Protractor control flow? alecxe The usual approach is to start protractor in a debug mode and put browser.debugger() breakpoint before the problem block of code. See more information at Debugging Protractor Tests . On the other hand, you can catch the chromedriver service logs that look like: [2.389][INFO]: COMMAND FindElement {

How to set cookies within Cypress testing?

∥☆過路亽.° 提交于 2019-12-08 12:37:17
问题 this example taken from the Cypress documentation won't work properly: cy.getCookies().should('be.empty'); cy.setCookie('session_id', '189jd09sufh33aaiidhf99d09'); cy.getCookie('session_id').should('have.property', 'value', '189jd09sufh33aaiidhf99d09'); Every time I try to setCookie(), it appears to set it without issue but always returns this when I call getCookies(): $Chainer {chainerId: "chainer18", firstCall: false} chainerId: "chainer18" firstCall: false __proto__: Object Is there

Protractor Timing Issues

喜你入骨 提交于 2019-12-08 10:40:19
问题 I currently have the following code in one of my test specs for Protractor: .then(function() { return button.click(); }) .then(function() { return element(otherButton).isDisplayed(); }) .then(function(otherButtonIsPresent) { if(otherButtonIsPresent) { return browser.wait(EC.elementToBeClickable(element(otherButton)), getWaitTime()) .then(function() { element(otherButton).click(); return element(continueButton).isPresent(); }) } }) When I use Chrome to debug using the --debug-brk and --inspect

Protractor tests failing in second run for ng-reflect attribute

我的梦境 提交于 2019-12-08 08:17:29
问题 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