How can I obtain current browser in scripts?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
02-01-2023
12:48 AM
02-01-2023
12:48 AM
How can I obtain current browser in scripts?
I use TestComplete with BitBar to test web applications. My tests are scripted in javascript and I start remote browser like this:
var capabilities = {
"platform": "Windows",
"osVersion": "11",
"browserName": "Chrome",
"version": "109",
"resolution": "1920x1080"
};
var server = "https://eu-desktop-hub.bitbar.com/wd/hub";
function StartInBitBar() {
Browsers.RemoteItem(server, capabilities).Run("");
}
function DoSomeTests() {
//Here I need to obtain the Remote browser item created in StartInBitBar(), but how?
//This fails:
Log.Message(Browsers.CurrentBrowser.Description);
}
Labels:
- Labels:
-
Bitbar
-
Remote browsers
-
Scripting
-
TestComplete
1 REPLY 1
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
05-26-2023
10:08 AM
05-26-2023
10:08 AM
Try swapping out the browser version here "version: 109" to this:
'version': 'latest',
