end-to-end

protractor: test for focus of field

房东的猫 提交于 2021-02-08 05:25:16
问题 How can I test if an input field is infocus with protractor? I'm doing this: it('should focus email field', function(){ expect(element(by.model('login.email')).getAttribute('id')).toEqual(browser.driver.switchTo().activeElement().getAttribute('id')); }); This seems to work with chrome, but this test fails with firefox. Any ideas? This is the failure message: [firefox #1] 2) Login page should focus email field [firefox #1] Message: [firefox #1] Expected 'login' to equal ''. [firefox #1]

Protractor browser.wait doesn't wait

允我心安 提交于 2021-02-05 19:47:16
问题 I am assuming that browser.wait should be a blocking call, but it is not working as I expected. Here is my sample: describe("browser.wait", function() { beforeEach(function() { browser.wait(function() { console.log('1 - BeforeEach WAIT'); return true; }); console.log('2 - BeforeEach after wait'); }); afterEach(function() { browser.wait(function() { console.log('4 - afterEach WAIT'); return true; }); console.log('5 - afterEach after wait'); }); it('should probably actually wait.', function() {

Protractor browser.wait doesn't wait

主宰稳场 提交于 2021-02-05 19:41:25
问题 I am assuming that browser.wait should be a blocking call, but it is not working as I expected. Here is my sample: describe("browser.wait", function() { beforeEach(function() { browser.wait(function() { console.log('1 - BeforeEach WAIT'); return true; }); console.log('2 - BeforeEach after wait'); }); afterEach(function() { browser.wait(function() { console.log('4 - afterEach WAIT'); return true; }); console.log('5 - afterEach after wait'); }); it('should probably actually wait.', function() {

Protractor browser.wait doesn't wait

青春壹個敷衍的年華 提交于 2021-02-05 19:38:03
问题 I am assuming that browser.wait should be a blocking call, but it is not working as I expected. Here is my sample: describe("browser.wait", function() { beforeEach(function() { browser.wait(function() { console.log('1 - BeforeEach WAIT'); return true; }); console.log('2 - BeforeEach after wait'); }); afterEach(function() { browser.wait(function() { console.log('4 - afterEach WAIT'); return true; }); console.log('5 - afterEach after wait'); }); it('should probably actually wait.', function() {

integrate puppeteer in gitlab with gitlab-ci.yml

こ雲淡風輕ζ 提交于 2020-12-29 05:32:43
问题 Im currently working on e2e test in Chrome Puppeteer. I am at the stage where it would be ideal to integrate my tests in the development process. What I want to accomplish is the following: my tests run automated before every deploy to production. If they succeed deployment goes through, if they fail deployment is canceled. I use a pipeline on gitlab to automate my deployment process. So my main question is how can I integrate my puppeteer tests into the gitlab-ci.yml file? 回答1: This might be

Cypress - how to find by text content?

Deadly 提交于 2020-12-29 05:18:32
问题 In Cypress, I want to select a button from a group of buttons based on its text-content. How can I do it? Here is my approach: export const getCustomerButton = () => getNavigationSidenav() .find('mat-expansion-panel-header') .each(($el, index, $list) => { const text = $el.find('.mat-content > mat-panel-title').text(); if (text === 'Customer') { return $el; } return null; }); The problem I have now is that I have to filter out the nulls from the element array. Is there a less complicated way?

Cypress - how to find by text content?

≯℡__Kan透↙ 提交于 2020-12-29 05:15:43
问题 In Cypress, I want to select a button from a group of buttons based on its text-content. How can I do it? Here is my approach: export const getCustomerButton = () => getNavigationSidenav() .find('mat-expansion-panel-header') .each(($el, index, $list) => { const text = $el.find('.mat-content > mat-panel-title').text(); if (text === 'Customer') { return $el; } return null; }); The problem I have now is that I have to filter out the nulls from the element array. Is there a less complicated way?

Is Puppeteer-Cluster Stealthy enough to pass bot tests?

99封情书 提交于 2020-02-02 11:26:23
问题 I wanted to know if anyone using Puppeteer-Cluster could elaborate on how the Cluster.Launch({settings}) protects against sharing of cookies and web data between pages in different context. Do the browser contexts here, actually block cookies and user-data is not shared or tracked? Browserless' now infamous page seems to think no, here and that .launch({}) should be called on the task, not ahead of the queue. So my question is, how do we know if puppeteer-cluster is sharing cookies / data