This repo contains samples for running Apple Pay with Playwright tests on BrowserStack using the browserstack-node-sdk and the non SDK approach.
- Clone the repo
git clone -b sdk https://github.com/browserstack/node-js-playwright-browserstack.gitand runcd node-js-playwright-browserstack. - Set
BROWSERSTACK_USERNAMEandBROWSERSTACK_ACCESS_KEYas environment variables with your BrowserStack Username and Access Key or update the same inbrowserstack.ymlfile. - Run
npm ito install the dependencies.
- To run the sample tests in parallel across the platforms specified in the
browserstack.yml, runnpm run sample-test. - To run the test with non sdk integration, run
npm run sample-nonsdk-test. - To run the sample local tests in parallel across the platforms specified in the
browserstack.yml, runnpm run sample-local-test.
- Apple Pay button in most cases are secured. On the Selenium tests we normally switch to native context and perform the click to avoid issues. Playwright's inbuilt tap action doesn't work with secured Apple Pay buttons. We need to have an easy way to do this.
- Automate team created a feature called ios-click specifically for performing native taps on Playwright on BrowserStack iOS devices. This repo leverages that feature and perform the native tap. This works well with the secured Apple Pay button
