Practice - 5 Tasks
Answer the questions below
1fill in blank
easyComplete the code to setup ChromeDriver automatically using WebDriverManager.
Selenium Java
WebDriverManager.[1]().setup(); Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong driver method like firefoxdriver() when testing Chrome.
Forgetting to call setup() after specifying the driver.
✗ Incorrect
Use chromedriver() to setup ChromeDriver automatically.
2fill in blank
mediumComplete the code to create a new ChromeDriver instance after setup.
Selenium Java
WebDriver driver = new [1](); Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Creating FirefoxDriver instance after setting up ChromeDriver.
Using a driver class that does not match the browser.
✗ Incorrect
After setting up ChromeDriver, create its instance with new ChromeDriver().
3fill in blank
hardFix the error in the code to correctly setup FirefoxDriver with WebDriverManager.
Selenium Java
WebDriverManager.[1]().setup(); Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using chromedriver() when intending to setup FirefoxDriver.
Misspelling the driver method name.
✗ Incorrect
Use firefoxdriver() to setup FirefoxDriver automatically.
4fill in blank
hardFill both blanks to setup EdgeDriver and create its instance.
Selenium Java
WebDriverManager.[1]().setup(); WebDriver driver = new [2]();
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Mixing ChromeDriver class with EdgeDriver setup.
Using wrong casing for driver class names.
✗ Incorrect
Use edgedriver() to setup and new EdgeDriver() to create the driver instance.
5fill in blank
hardFill all three blanks to setup ChromeDriver, create its instance, and open a URL.
Selenium Java
WebDriverManager.[1]().setup(); WebDriver driver = new [2](); driver.[3]("https://example.com");
Drag options to blanks, or click blank then click option'
Attempts:
3 left
💡 Hint
Common Mistakes
Using
navigate() instead of get() to open URL.Mixing driver classes and setup methods from different browsers.
✗ Incorrect
Setup ChromeDriver with chromedriver(), create instance with new ChromeDriver(), and open URL with get().