We are testing Webdriver.IO (https://webdriver.io/) with TypeScript to test if it could be a good framework for automating End-to-End GUI-tests on a Web-application. We have already tried Cypress and TestProject.IO, both of which have test-script recorders either natively built or with plugins or both. I couldn’t find a way to record end-to-end tests with Webdriver.IO – meaning I want to
Tag: automated-tests
Testcafe: Click on checkbox inside a virtual element (#document)
So here is the HTML section that describes my reCAPTCHA element and the blue coloured part is the one I’m trying to access: I am aware that for the reCAPTCHA elements there are other workarounds. But I’m curious if it is possible just to click on the checkbox because the test does anyway not appear and it passes automatically when
How can I wait for a request to load in Cypress?
I’m writing automate test on Cypress and I want to wait for a page to load. There is a request named “Availability” that if it passes with statusCode:200 then the page loads. I’ve tried this, but it didn’t work: How can I do this? Answer Where is your page visit? If it’s here, it won’t work You need to set
How To Configure Cypress To Wait Longer (or Indefinitely) for BaseUrl?
I am using this Cypress image in a docker-compose.yml to run end to end tests: cypress/included:6.1.0 When the test runner starts it will verify that a server can be reached at baseUrl. If not, it retries 3 times. My services and web server need a little more time to start. How can I increase the timeout and/or number of retries
How to get all data from a row as an object in cypress?
So, my web page has a table structure with multiple rows. I want to create a function which gets all the values from a row and creates an object with the header as the keys and the values. The kind of output I want: This is what I have tried: This is returning me an object with the index as
What is the difference between import and cy.fixture in Cypress tests?
I’m learning cypress and I don’t understand what differs from import file from ‘../fixtures/filepath/file.json’ a fixture file and calling cy.fixture(file), and when should I use each one. Answer Basically when you say import file from ‘../fixtures/filepath/file.json’ you can use the imported file in any of methods in the particular javascript file. Whereas if you say cy.fixture(file.json), then the fixture context
Is there a way to force cypress to open in same tab instead of another tab
I know one of Cypress’ trade-offs is testing on multiple tabs. However, our website default to opening another tab. Can I force Cypress to open on same tab to continue my tests? I have this code below but still opens a new tab: I remember finding it somewhere that it can be done but my 1am brain is unable to
Testcafe filter function
I have a filter function for Selector as following which accepts two parameters { subject: subject, from: from } as a dependencies object. But after running this function, I am getting an error ReferenceError: subject is not defined Can TestCafe team please help me with this? Answer In the case of the .filter method you need to rewrite your dependencies
How to verify if a node in response body has unique value with postman?
The following is the response body of an API: In Postman Tests, how to verify if exercise_num node in the response body above is unique? Answer Filter out unique exercise_num values and compare the length of the actual array and unique value array. Where you can use Array#reduce method for filtering unique values.
Injecting CSS into site with Puppeteer
The site I’m running automated tests on with Puppeteer displays info popups if actions were successful or when something failed. Unfortunately, these popups sometimes cover up buttons my script has to click on. It would be great if I could inject some CSS into the site to hide these popups. Is there an built-in way to do this? Answer addStyleTag: