HomeWeb Testing Use Existing Tests with webmate Use Existing Tests with webmate Integrating your existing Selenium tests with webmate is easy.
You simply need to replace the existing WebDriver instance,
e.g. a FirefoxDriver with a RemoteWebDriver and add some
webmate-specific Selenium capabilities.
1
2
3
4
5
6
7
8
9
10
DesiredCapabilities caps = new DesiredCapabilities();
caps.setCapability ("wm:email" , "xxx@xxx.com" );
caps.setCapability ("wm:apikey" , "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=" );
caps.setCapability ("wm:project" , "7c4f09fd-xxx-xxx-xxx-xxx" );
caps.setCapability ("browserName" , "CHROME" );
caps.setCapability ("browserVersion" , "126" );
caps.setCapability ("platformName" , "WINDOWS_11_64" );
RemoteWebDriver driver;
driver = new RemoteWebDriver(new URL("https://selenium.webmate.io/wd/hub" ), caps);
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
let options = {
capabilities : {
browserName : "CHROME" ,
version : "83" ,
platformName : "WINDOWS_11_64" ,
wm :apikey : "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx=" ,
wm :project : "7c4f09fd-xxx-xxx-xxx-xxx"
},
hostname : "app.webmate.io" ,
protocol : "https" ,
port : 44444 ,
connectionRetryTimeout : 240000 ,
connectionRetryCount : 1 ,
logLevel : 'debug'
}
const browserObj : BrowserObject = await webdriverio .remote (options );
You can find more details on how to interact with webmate browsers and devices on Getting Started
.
Last update on 20 August 2020
1 min read