Skip to main content

Posts

Showing posts with the label cross browser testing

Cypress UI Automation - part 3

  Cross Browser Testing BrowserStack implementation I created a local git branch using Visual studio code, then installed BrowserStack as follows: Firstly install it on the command line : npm install -g BrowserStack-cypress-cli --save-dev Setup the BrowserStack credentials to use by initiating the browserstack.json file as follows: BrowserStack-cypress init If this does not work, right-click the cypress folder, create a new file as BrowserStack-cypress.json. I executed the following command. npm run test:first. To run the BrowserStack tests. Below is a screenshot of the browserstack.json file. Code in the package.json file to execute the BrowserStack tests: In the change, I have edited the baseUrl with the –env env=stg, pointing it to the environment file which contains details of the test environment that loads the test pages/websites. Then I specified details of a test spec file. I executed the test command resulting in a successful execution – Errors after ...