0
0
Selenium Pythontesting~10 mins

Cloud testing platforms (BrowserStack, Sauce Labs) in Selenium Python - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to set the BrowserStack username in the capabilities dictionary.

Selenium Python
capabilities = {
    'browserstack.user': [1]
}
Drag options to blanks, or click blank then click option'
Aos_version
B"your_username"
Cbrowser_version
Dyour_password
Attempts:
3 left
💡 Hint
Common Mistakes
Using password instead of username
Leaving the value without quotes
2fill in blank
medium

Complete the code to create a remote WebDriver session with Sauce Labs URL.

Selenium Python
driver = webdriver.Remote(
    command_executor=[1],
    desired_capabilities=capabilities
)
Drag options to blanks, or click blank then click option'
A"http://localhost:4444/wd/hub"
B"http://127.0.0.1:5555/wd/hub"
C"https://browserstack.com/wd/hub"
D"https://ondemand.saucelabs.com/wd/hub"
Attempts:
3 left
💡 Hint
Common Mistakes
Using localhost URL instead of Sauce Labs URL
Using BrowserStack URL for Sauce Labs
3fill in blank
hard

Fix the error in the code to correctly set the BrowserStack access key in capabilities.

Selenium Python
capabilities = {
    'browserstack.key': [1]
}
Drag options to blanks, or click blank then click option'
A"your_access_key"
Byour_access_key
Caccess_key
D'your_access_key'
Attempts:
3 left
💡 Hint
Common Mistakes
Not using quotes around the access key
Using variable name instead of string
4fill in blank
hard

Fill both blanks to create a capabilities dictionary for running tests on Windows 11 with Chrome browser on BrowserStack.

Selenium Python
capabilities = {
    'os': '[1]',
    'browserName': '[2]'
}
Drag options to blanks, or click blank then click option'
AWindows
BLinux
CChrome
DFirefox
Attempts:
3 left
💡 Hint
Common Mistakes
Using Linux instead of Windows
Using Firefox instead of Chrome
5fill in blank
hard

Fill all three blanks to set up a Sauce Labs capabilities dictionary with platform name, browser name, and browser version.

Selenium Python
capabilities = {
    'platformName': '[1]',
    'browserName': '[2]',
    'browserVersion': '[3]'
}
Drag options to blanks, or click blank then click option'
AWindows 10
BChrome
Clatest
DmacOS
Attempts:
3 left
💡 Hint
Common Mistakes
Using 'macOS' for platform when Windows 10 is needed
Using lowercase 'chrome' for browser name