From efa1578276f8b0742204670c672b92fe97ca9e5e Mon Sep 17 00:00:00 2001 From: Dominik Kocerka Date: Thu, 21 Apr 2022 10:20:48 +0200 Subject: [PATCH] updating hub url --- .../client-side/NodeJS/bitbar_selenium.js | 12 ++---------- .../com/bitbar/selenium/BitbarSelenium.java | 17 ++++------------- .../client-side/python/bitbar_selenium.py | 11 ++--------- .../client-side/ruby/bitbar_selenium.rb | 12 ++---------- 4 files changed, 10 insertions(+), 42 deletions(-) diff --git a/samples/testing-frameworks/desktop-browsers/client-side/NodeJS/bitbar_selenium.js b/samples/testing-frameworks/desktop-browsers/client-side/NodeJS/bitbar_selenium.js index 9ed3d13f..c87683c4 100644 --- a/samples/testing-frameworks/desktop-browsers/client-side/NodeJS/bitbar_selenium.js +++ b/samples/testing-frameworks/desktop-browsers/client-side/NodeJS/bitbar_selenium.js @@ -14,7 +14,7 @@ var capabilities = { 'bitbar_apiKey': '', 'platform': 'Windows', 'browserName': 'Chrome', - 'version': '94', + 'version': '99', 'resolution': '1920x1080', 'bitbar_project': 'Selenium sample project', 'bitbar_testrun': 'NodeJS sample test', @@ -22,18 +22,10 @@ var capabilities = { } // user-customizable parameters end here -if (capabilities['platform'].toLowerCase() == 'windows') { - var hub_url = 'https://westeurope-hub.bitbar.com/wd/hub'; -} else if (capabilities['platform'].toLowerCase() == 'linux') { - var hub_url = 'https://broker-cloud.bitbar.com/wd/hub'; -} else { - throw 'Unsupported platform'; -} - async function nodeJsSample() { try { var driver = new webdriver.Builder() - .usingServer(hub_url) + .usingServer('https://appium.bitbar.com/wd/hub') .withCapabilities(capabilities) .build(); diff --git a/samples/testing-frameworks/desktop-browsers/client-side/java/src/test/java/com/bitbar/selenium/BitbarSelenium.java b/samples/testing-frameworks/desktop-browsers/client-side/java/src/test/java/com/bitbar/selenium/BitbarSelenium.java index 1f65193f..cea94a42 100644 --- a/samples/testing-frameworks/desktop-browsers/client-side/java/src/test/java/com/bitbar/selenium/BitbarSelenium.java +++ b/samples/testing-frameworks/desktop-browsers/client-side/java/src/test/java/com/bitbar/selenium/BitbarSelenium.java @@ -9,6 +9,8 @@ public class BitbarSelenium { + public static final String URL = "https://appium.bitbar.com/wd/hub"; + public static void main(String[] args) throws Exception { // IMPORTANT: Set the following parameters according to your needs. // You can use Capabilities creator: @@ -21,25 +23,14 @@ public static void main(String[] args) throws Exception { capabilities.setCapability("bitbar_apiKey", ""); capabilities.setCapability("platform", "Windows"); capabilities.setCapability("browserName", "Chrome"); - capabilities.setCapability("version", "94"); + capabilities.setCapability("version", "99"); capabilities.setCapability("resolution", "1920x1080"); capabilities.setCapability("bitbar_project", "Selenium sample project"); capabilities.setCapability("bitbar_testrun", "Java sample test"); capabilities.setCapability("bitbar_testTimeout", "600"); // user-customizable parameters end here - String hub_url; - String platform = capabilities.getPlatform().toString().toLowerCase(); - - if (platform.equals("windows")) { - hub_url = "https://westeurope-hub.bitbar.com/wd/hub"; - } else if (platform.equals("linux")) { - hub_url = "https://broker-cloud.bitbar.com/wd/hub"; - } else { - throw new Exception("Unsupported platform"); - } - - WebDriver driver = new RemoteWebDriver(new URL(hub_url), capabilities); + WebDriver driver = new RemoteWebDriver(new URL(URL), capabilities); // check page title String test_url = "https://bitbar.github.io/web-testing-target/"; diff --git a/samples/testing-frameworks/desktop-browsers/client-side/python/bitbar_selenium.py b/samples/testing-frameworks/desktop-browsers/client-side/python/bitbar_selenium.py index 64732a94..85835691 100644 --- a/samples/testing-frameworks/desktop-browsers/client-side/python/bitbar_selenium.py +++ b/samples/testing-frameworks/desktop-browsers/client-side/python/bitbar_selenium.py @@ -20,7 +20,7 @@ def setUp(self): 'bitbar_apiKey': '', 'platform': 'Windows', 'browserName': 'Chrome', - 'version': '94', + 'version': '99', 'resolution': '1920x1080', 'bitbar_project': 'Selenium sample project', 'bitbar_testrun': 'Python sample test', @@ -30,14 +30,7 @@ def setUp(self): self.screenshot_dir = os.getcwd() + '/screenshots' - if capabilities['platform'].lower() == 'windows': - hub_url = 'https://westeurope-hub.bitbar.com/wd/hub' - elif capabilities['platform'].lower() == 'linux': - hub_url = 'https://broker-cloud.bitbar.com/wd/hub' - else: - raise Exception("Unsupported platform") - - self.driver = webdriver.Remote(command_executor=hub_url, + self.driver = webdriver.Remote(command_executor='https://appium.bitbar.com/wd/hub', desired_capabilities=capabilities) def tearDown(self): diff --git a/samples/testing-frameworks/desktop-browsers/client-side/ruby/bitbar_selenium.rb b/samples/testing-frameworks/desktop-browsers/client-side/ruby/bitbar_selenium.rb index 1d47916f..ff2a7760 100644 --- a/samples/testing-frameworks/desktop-browsers/client-side/ruby/bitbar_selenium.rb +++ b/samples/testing-frameworks/desktop-browsers/client-side/ruby/bitbar_selenium.rb @@ -13,24 +13,16 @@ capabilities['bitbar_apiKey'] = '' capabilities['platform'] = 'Windows' capabilities['browserName'] = 'Chrome' -capabilities['version'] = '94' +capabilities['version'] = '99' capabilities['resolution'] = '1920x1080' capabilities['bitbar_project'] = 'Selenium sample project' capabilities['bitbar_testrun'] = 'Ruby sample test' capabilities['bitbar_testTimeout'] = '600' # user-customizable parameters end here -if capabilities['platform'].downcase == 'windows' - hub_url = "https://westeurope-hub.bitbar.com/wd/hub" -elsif capabilities['platform'].downcase == 'linux' - hub_url = "https://broker-cloud.bitbar.com/wd/hub" -else - raise "Unsupported platform" -end - begin driver = Selenium::WebDriver.for(:remote, - :url => hub_url, + :url => "https://appium.bitbar.com/wd/hub", :capabilities => capabilities) # check page title