You are on page 1of 15

Selenium

• The Options Class is a concept in Selenium


WebDriver for manipulating various properties
of the driver. The Options class is generally
used in conjunction with Desired Capabilities
for customizing driver sessions. It helps you
perform various operations like opening
browser in maximized mode, disable
existing extensions, disable pop-ups, etc.

2
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Options
• Eg: Maximize

3
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Options
• Eg: Maximize
• 2 Ways to maximize browsers
• Driver manage:

• Browser Options:

4
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Options
• Eg: Headless

5
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Options
• Eg: Headless

6
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Options
eg: Popup

7
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Options
eg: Popup

8
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Capabilites
• Desired Capabilities is a class in Selenium
used to set properties of browsers to perform
cross browser testing of web applications. It
stores the capabilities as key-value pairs and
these capabilities are used to set browser
properties like browser name, browser
version, path of browser driver in the system,
etc. to determine the behaviour of browser at
run time.

9
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Capabilites
eg: SSLCertificate

10
KHOA CÔNG NGHỆ THÔNG TIN
Selenium Capabilites
eg: SSLCertificate

11
KHOA CÔNG NGHỆ THÔNG TIN
WebDriverManager is an open-source Java
library that automatically performs the four steps
(find, download, setup, and maintenance)
mentioned above for the drivers required for
Selenium tests.

12
KHOA CÔNG NGHỆ THÔNG TIN
WebDriverManager
Require WebDriverManager to use:

13
KHOA CÔNG NGHỆ THÔNG TIN
Summary
Browser options:
The Options Class is a concept in Selenium WebDriver helps you perform
various operations like opening browser in maximized mode, disable existing
extensions, disable pop-ups, etc
Desired Capabilities:
Is a class in Selenium used to determine the behaviour of browser at run time.
WebDriverManager:
Automatically performs the four steps (find, download, setup, and maintenance)
for the driver use to run automation.

14
KHOA CÔNG NGHỆ THÔNG TIN
Reference

Browser Options:
https://www.selenium.dev/documentation/webdriver/drivers/options/
Desired Capabilities:
https://www.selenium.dev/documentation/legacy/desired_capabilities/
DriverManager:
https://github.com/bonigarcia/webdrivermanager

15
KHOA CÔNG NGHỆ THÔNG TIN

You might also like