This folder contains a sample client-side Selenium test for desktop browsers in BitBar Cloud.
bitbar_selenium.jsruns a Selenium WebDriver session against the BitBar desktop hub, opens the sample page, clicks the button, and validates the page title, result text, and button style.package.jsondefines the Node.js dependencies for the sample.
- Node.js
- npm
- A valid BitBar API key
This sample uses the dependencies declared in package.json:
selenium-webdriver^4.28.1chai^5.1.2
Open bitbar_selenium.js and replace the apiKey value with your own BitBar API key.
Install the project dependencies from this folder:
npm installFrom this folder, run:
node bitbar_selenium.jsA successful run prints output similar to:
Bitbar - Test Page for Samples Bitbar
If npm install fails, verify that node and npm are installed and available in your shell.
If the test starts but fails to create a remote session, check that the BitBar apiKey in bitbar_selenium.js is valid.