From 949485782b38c9d7ae93da01acda6b764d504e32 Mon Sep 17 00:00:00 2001 From: DimpleBhat22 Date: Thu, 11 Jun 2026 17:40:36 +0530 Subject: [PATCH 1/7] Added automationname to property fileand added 2 new device propertiy files --- .../properties/Apple iPhone 16 A3287 26.2.properties | 5 +++++ .../src/test/resources/properties/GooglePixelXL.properties | 1 + .../properties/Samsung Galaxy S24 Ultra SM-S928B.properties | 5 +++++ 3 files changed, 11 insertions(+) create mode 100644 samples/testng-parallel-mobile-tests/src/test/resources/properties/Apple iPhone 16 A3287 26.2.properties create mode 100644 samples/testng-parallel-mobile-tests/src/test/resources/properties/Samsung Galaxy S24 Ultra SM-S928B.properties diff --git a/samples/testng-parallel-mobile-tests/src/test/resources/properties/Apple iPhone 16 A3287 26.2.properties b/samples/testng-parallel-mobile-tests/src/test/resources/properties/Apple iPhone 16 A3287 26.2.properties new file mode 100644 index 00000000..4258560a --- /dev/null +++ b/samples/testng-parallel-mobile-tests/src/test/resources/properties/Apple iPhone 16 A3287 26.2.properties @@ -0,0 +1,5 @@ +bitbar_device = Apple iPhone 16 A3287 26.2 +browser_name = safari +platform_name = iOS +device_name = iPhone device +automation_name = XCUITest diff --git a/samples/testng-parallel-mobile-tests/src/test/resources/properties/GooglePixelXL.properties b/samples/testng-parallel-mobile-tests/src/test/resources/properties/GooglePixelXL.properties index 4e92c85b..ed802dc6 100644 --- a/samples/testng-parallel-mobile-tests/src/test/resources/properties/GooglePixelXL.properties +++ b/samples/testng-parallel-mobile-tests/src/test/resources/properties/GooglePixelXL.properties @@ -2,3 +2,4 @@ bitbar_device = Google Pixel XL browser_name = chrome platform_name = Android device_name = Android Phone +automation_name = UiAutomator2 diff --git a/samples/testng-parallel-mobile-tests/src/test/resources/properties/Samsung Galaxy S24 Ultra SM-S928B.properties b/samples/testng-parallel-mobile-tests/src/test/resources/properties/Samsung Galaxy S24 Ultra SM-S928B.properties new file mode 100644 index 00000000..bd4093ba --- /dev/null +++ b/samples/testng-parallel-mobile-tests/src/test/resources/properties/Samsung Galaxy S24 Ultra SM-S928B.properties @@ -0,0 +1,5 @@ +bitbar_device = Samsung Galaxy S24 Ultra SM-S928B +browser_name = chrome +platform_name = Android +device_name = Android Phone +automation_name = UiAutomator2 From a28cc58faab5e7c30be4cf608d4f61e2c4ba0dff Mon Sep 17 00:00:00 2001 From: DimpleBhat22 Date: Fri, 12 Jun 2026 17:37:00 +0530 Subject: [PATCH 2/7] READ.md file for selenium/java --- .../selenium/client-side/java/README.md | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 samples/testing-frameworks/selenium/client-side/java/README.md diff --git a/samples/testing-frameworks/selenium/client-side/java/README.md b/samples/testing-frameworks/selenium/client-side/java/README.md new file mode 100644 index 00000000..783c65a4 --- /dev/null +++ b/samples/testing-frameworks/selenium/client-side/java/README.md @@ -0,0 +1,48 @@ +Intro +===== + +This folder contains a sample client side Selenium test for desktop browsers in BitBar Cloud. +To run the sample, go to `https://cloud.bitbar.com/` and use a valid Bitbar API key. + +Folder Content +-------------- + +This folder contains the following files: + +* `src/test/java/com/bitbar/selenium/BitbarSelenium.java` is the Java sample test. + +* `pom.xml` defines the Maven project and pulls the Selenium Java dependency used by the sample. + +Requirements +------------ + +* Java 8 or newer +* Maven 3.6 or newer +* A valid Bitbar API key + +Before Running +-------------- + +Add your BitBar Key here in BitbarSelenium.java:- +* `bitbarOptions.put("apiKey", "");` + +Run Locally +----------- + +From this folder, run: + +```bash +mvn -q -DskipTests test-compile org.codehaus.mojo:exec-maven-plugin:3.6.0:java \ + -Dexec.mainClass=com.bitbar.selenium.BitbarSelenium \ + -Dexec.classpathScope=test +``` + +Expected Output +--------------- + +A successful run prints output similar to: + +```text +Bitbar - Test Page for Samples +Bitbar +``` From d7801c9c79c8b17c874ae007f329506fb6e09f8c Mon Sep 17 00:00:00 2001 From: DimpleBhat22 Date: Mon, 15 Jun 2026 22:45:31 +0530 Subject: [PATCH 3/7] README.md file for selenium-Csharp --- .../SeleniumCsharpSample/README.md | 59 +++++++++++++++++++ 1 file changed, 59 insertions(+) create mode 100644 samples/testing-frameworks/selenium/client-side/CSharp/SeleniumCSharpSample/SeleniumCsharpSample/README.md diff --git a/samples/testing-frameworks/selenium/client-side/CSharp/SeleniumCSharpSample/SeleniumCsharpSample/README.md b/samples/testing-frameworks/selenium/client-side/CSharp/SeleniumCSharpSample/SeleniumCsharpSample/README.md new file mode 100644 index 00000000..63d99927 --- /dev/null +++ b/samples/testing-frameworks/selenium/client-side/CSharp/SeleniumCSharpSample/SeleniumCsharpSample/README.md @@ -0,0 +1,59 @@ +# BitBar Selenium C# Sample + +This folder contains a C# NUnit Selenium sample + +## Prerequisites + +- .NET SDK installed (current project targets `net10.0`/`net7.0`) +- A valid BitBar API key + + +## Files + +- `UnitTest1.cs`: Main sample test +- `BitbarSeleniumSampleCSharp.csproj`: Project file and dependencies + +## Run the test + +From this folder: + +```bash +dotnet test BitbarSeleniumSampleCSharp.csproj +``` + +## Configure BitBar + +Update capabilities in `UnitTest1.cs` as needed: + +- platformName +- browserVersion +- bitbar:options (project, testrun, apiKey, osVersion, resolution) + + +## Corner Cases / Troubleshooting + +- SDK version mismatch (`NETSDK1045`): + If your local SDK does not support the target framework, install a compatible SDK or change the target framework in `BitbarSeleniumSampleCSharp.csproj`. + + Example to install/check SDK: + + ```bash + dotnet --list-sdks + ``` + +- Need to update Selenium WebDriver version: + If tests fail after browser or API-side changes, update `Selenium.WebDriver` to a newer compatible version. + + ```bash + dotnet add BitbarSeleniumSampleCSharp.csproj package Selenium.WebDriver --version 4.33.0 + dotnet restore + ``` + +- Package restore/build issues after version change: + Clean and restore dependencies before running tests again. + + ```bash + dotnet clean BitbarSeleniumSampleCSharp.csproj + dotnet restore BitbarSeleniumSampleCSharp.csproj + dotnet test BitbarSeleniumSampleCSharp.csproj + ``` \ No newline at end of file From ff5d4389354a1b0a1c088668a1139802eb063848 Mon Sep 17 00:00:00 2001 From: DimpleBhat22 Date: Tue, 16 Jun 2026 16:31:03 +0530 Subject: [PATCH 4/7] README.md file for selenium Python --- .../selenium/client-side/python/README.md | 27 +++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 samples/testing-frameworks/selenium/client-side/python/README.md diff --git a/samples/testing-frameworks/selenium/client-side/python/README.md b/samples/testing-frameworks/selenium/client-side/python/README.md new file mode 100644 index 00000000..2a91b227 --- /dev/null +++ b/samples/testing-frameworks/selenium/client-side/python/README.md @@ -0,0 +1,27 @@ +# Selenium Python Sample + +1. Open `bitbar_selenium.py` and update `apiKey` in `capabilities`. +2. Install compatible Selenium: +3. Run: + +```bash +python3 bitbar_selenium.py +``` + +## Common Error + +Error: + +```text +TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities' +``` + +Cause: +- Installed Selenium version is too new for this sample code. + +Fix: + +```bash +python -m pip install "selenium==4.9.1" +(any selenium version that is compatible) +``` From 787377ee443f5cbd8e3e566970bf69a96d2df988 Mon Sep 17 00:00:00 2001 From: DimpleBhat22 Date: Wed, 17 Jun 2026 17:55:59 +0530 Subject: [PATCH 5/7] Added dependencies for desktop browser-python --- .../desktop-browsers/client-side/python/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/samples/testing-frameworks/desktop-browsers/client-side/python/README.md b/samples/testing-frameworks/desktop-browsers/client-side/python/README.md index 2f8cfab6..4910f0dc 100644 --- a/samples/testing-frameworks/desktop-browsers/client-side/python/README.md +++ b/samples/testing-frameworks/desktop-browsers/client-side/python/README.md @@ -39,6 +39,15 @@ or python3 -m pip install --break-system-packages selenium ``` +For this sample to run without any code changes, pin Selenium and urllib3 to versions compatible with the current `desired_capabilities` usage: + +```bash +python3 -m venv .venv_selenium3 +source .venv_selenium3/bin/activate +python3 -m pip install "selenium==3.141.0" +python3 -m pip install "urllib3<2" +``` + Then set your BitBar API key in the test capabilities in `bitbar_selenium.py`. Run @@ -47,6 +56,7 @@ Run From this folder, run: ```bash +source .venv_selenium3/bin/activate python3 bitbar_selenium.py ``` @@ -67,4 +77,7 @@ Troubleshooting * `ModuleNotFoundError: No module named 'selenium'` means Selenium is not installed for the Python interpreter you used to launch the test. * `SessionNotCreatedException: Full authentication is required to access this resource` usually means the BitBar API key is missing, invalid, or expired. +* `TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities'` means Selenium 4 is being used with a Selenium 3 style sample. Activate `.venv_selenium3` and install pinned dependencies shown above. +* `ValueError: Timeout value connect was ` after installing Selenium 3 means `urllib3` is too new. Reinstall with `python3 -m pip install "urllib3<2" --force-reinstall`. +* `DeprecationWarning` messages from Selenium 3 internals can appear with newer Python versions and are non-blocking. * The sample saves screenshots into the local `screenshots` folder in the current working directory. \ No newline at end of file From d1158792a962dbeee92d33c1d6ab7f0116100560 Mon Sep 17 00:00:00 2001 From: DimpleBhat22 Date: Thu, 18 Jun 2026 17:08:04 +0530 Subject: [PATCH 6/7] Added README.md file for selenium-NodeJS --- .../selenium/client-side/NodeJS/README.md | 53 +++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 samples/testing-frameworks/selenium/client-side/NodeJS/README.md diff --git a/samples/testing-frameworks/selenium/client-side/NodeJS/README.md b/samples/testing-frameworks/selenium/client-side/NodeJS/README.md new file mode 100644 index 00000000..162f1364 --- /dev/null +++ b/samples/testing-frameworks/selenium/client-side/NodeJS/README.md @@ -0,0 +1,53 @@ +# Selenium NodeJS Sample + +This folder contains a sample client-side Selenium test for desktop browsers in BitBar Cloud. + +## Files + +- `bitbar_selenium.js` runs 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.json` defines the Node.js dependencies for the sample. + +## Requirements + +- Node.js +- npm +- A valid BitBar API key + +## Dependencies + +This sample uses the dependencies declared in `package.json`: + +- `selenium-webdriver` `^4.28.1` +- `chai` `^5.1.2` + +## Before Running + +Open `bitbar_selenium.js` and replace the `apiKey` value with your own BitBar API key. + +Install the project dependencies from this folder: + +```bash +npm install +``` + +## Run Locally + +From this folder, run: + +```bash +node bitbar_selenium.js +``` + +## Expected Output + +A successful run prints output similar to: + +Bitbar - Test Page for Samples +Bitbar + + +## Troubleshooting + +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. \ No newline at end of file From a54adaf4376fdbe3a330efbc2ee3f0112a2323cc Mon Sep 17 00:00:00 2001 From: DimpleBhat22 Date: Fri, 19 Jun 2026 18:18:42 +0530 Subject: [PATCH 7/7] Added requirement.txt file, README.md file for ruby and modified readme file --- .../client-side/python/README.md | 31 +++++----------- .../client-side/python/Requirements.txt | 2 ++ .../client-side/ruby/README.md | 35 +++++++++++++++++++ 3 files changed, 45 insertions(+), 23 deletions(-) create mode 100644 samples/testing-frameworks/desktop-browsers/client-side/python/Requirements.txt create mode 100644 samples/testing-frameworks/desktop-browsers/client-side/ruby/README.md diff --git a/samples/testing-frameworks/desktop-browsers/client-side/python/README.md b/samples/testing-frameworks/desktop-browsers/client-side/python/README.md index 4910f0dc..2a7dda93 100644 --- a/samples/testing-frameworks/desktop-browsers/client-side/python/README.md +++ b/samples/testing-frameworks/desktop-browsers/client-side/python/README.md @@ -7,6 +7,7 @@ Files ===== * `bitbar_selenium.py` contains the sample unittest that opens the BitBar sample page, verifies the result text, and saves screenshots locally. +* `Requirements.txt` contains the required Python package versions for this sample. * `screenshots/` is created when the test runs and stores the captured images. Prerequisites @@ -19,34 +20,19 @@ Prerequisites Setup ===== -Install Selenium with one of the following options: +Install dependencies from `Requirements.txt`: ```bash -python3 -m pip install selenium +python3 -m pip install -r Requirements.txt ``` -If your Python installation is managed by Homebrew and blocks global installs, use either a virtual environment or the explicit override: +If your Python installation is managed by Homebrew and blocks global installs, use: ```bash -python3 -m venv .venv -source .venv/bin/activate -python3 -m pip install selenium +python3 -m pip install --break-system-packages --user -r Requirements.txt ``` -or - -```bash -python3 -m pip install --break-system-packages selenium -``` - -For this sample to run without any code changes, pin Selenium and urllib3 to versions compatible with the current `desired_capabilities` usage: - -```bash -python3 -m venv .venv_selenium3 -source .venv_selenium3/bin/activate -python3 -m pip install "selenium==3.141.0" -python3 -m pip install "urllib3<2" -``` +For this sample to run without any code changes, use the package versions defined in `Requirements.txt`. Then set your BitBar API key in the test capabilities in `bitbar_selenium.py`. @@ -56,7 +42,6 @@ Run From this folder, run: ```bash -source .venv_selenium3/bin/activate python3 bitbar_selenium.py ``` @@ -77,7 +62,7 @@ Troubleshooting * `ModuleNotFoundError: No module named 'selenium'` means Selenium is not installed for the Python interpreter you used to launch the test. * `SessionNotCreatedException: Full authentication is required to access this resource` usually means the BitBar API key is missing, invalid, or expired. -* `TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities'` means Selenium 4 is being used with a Selenium 3 style sample. Activate `.venv_selenium3` and install pinned dependencies shown above. -* `ValueError: Timeout value connect was ` after installing Selenium 3 means `urllib3` is too new. Reinstall with `python3 -m pip install "urllib3<2" --force-reinstall`. +* `TypeError: WebDriver.__init__() got an unexpected keyword argument 'desired_capabilities'` means incompatible package versions are installed. Reinstall dependencies from `Requirements.txt`. +* `ValueError: Timeout value connect was ` usually means `urllib3` is too new for this sample. Reinstall dependencies from `Requirements.txt`. * `DeprecationWarning` messages from Selenium 3 internals can appear with newer Python versions and are non-blocking. * The sample saves screenshots into the local `screenshots` folder in the current working directory. \ No newline at end of file diff --git a/samples/testing-frameworks/desktop-browsers/client-side/python/Requirements.txt b/samples/testing-frameworks/desktop-browsers/client-side/python/Requirements.txt new file mode 100644 index 00000000..d06c3510 --- /dev/null +++ b/samples/testing-frameworks/desktop-browsers/client-side/python/Requirements.txt @@ -0,0 +1,2 @@ +selenium==3.141.0 +urllib3<2 diff --git a/samples/testing-frameworks/desktop-browsers/client-side/ruby/README.md b/samples/testing-frameworks/desktop-browsers/client-side/ruby/README.md new file mode 100644 index 00000000..7e2b7afb --- /dev/null +++ b/samples/testing-frameworks/desktop-browsers/client-side/ruby/README.md @@ -0,0 +1,35 @@ +# Ruby Selenium Sample + +This folder contains a Ruby Selenium example script: + +- `bitbar_selenium.rb` + +## Prerequisites + +- Ruby installed +- Gems installed (from this folder): + +```bash +bundle install +``` + +## Run + +From the repository root: + +```bash +ruby samples/testing-frameworks/desktop-browsers/client-side/ruby/bitbar_selenium.rb +``` + +Or from this folder: + +```bash +ruby bitbar_selenium.rb +``` + +## Expected Output + +When successful, the script prints page title text similar to: + +- Bitbar - Test Page for Samples +- Bitbar