0
0
Selenium Pythontesting~10 mins

Edge configuration 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 import the Edge WebDriver from Selenium.

Selenium Python
from selenium.webdriver.edge import [1]
Drag options to blanks, or click blank then click option'
AEdge
BChrome
CFirefox
DSafari
Attempts:
3 left
💡 Hint
Common Mistakes
Importing the wrong WebDriver class like Chrome or Firefox.
Using lowercase instead of the correct class name.
2fill in blank
medium

Complete the code to create an Edge WebDriver instance with default options.

Selenium Python
driver = [1]()
Drag options to blanks, or click blank then click option'
ASafari
BChrome
CFirefox
DEdge
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong WebDriver class name.
Forgetting the parentheses to instantiate the driver.
3fill in blank
hard

Fix the error in the code to set Edge options correctly.

Selenium Python
from selenium.webdriver.edge.options import EdgeOptions
options = EdgeOptions()
options.[1] = True
Drag options to blanks, or click blank then click option'
AHeadless
Bheadless
Cenable_headless
Dset_headless
Attempts:
3 left
💡 Hint
Common Mistakes
Using capitalized or incorrect attribute names.
Trying to call a method instead of setting an attribute.
4fill in blank
hard

Fill both blanks to add an argument to Edge options and create the driver with those options.

Selenium Python
options = EdgeOptions()
options.add_argument([1])
driver = Edge(options=[2])
Drag options to blanks, or click blank then click option'
A"--headless"
Boptions
C"--disable-gpu"
Ddriver
Attempts:
3 left
💡 Hint
Common Mistakes
Passing the wrong variable to the driver constructor.
Using incorrect argument strings without quotes.
5fill in blank
hard

Fill all three blanks to set Edge options for headless mode, disable GPU, and create the driver.

Selenium Python
options = EdgeOptions()
options.add_argument([1])
options.add_argument([2])
driver = Edge([3]=options)
Drag options to blanks, or click blank then click option'
A"--headless"
B"--disable-gpu"
Coptions
Ddriver
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing up variable names in the constructor.
Forgetting quotes around argument strings.