-
Notifications
You must be signed in to change notification settings - Fork 0
/
Selenium-HTML
153 lines (141 loc) · 76.9 KB
/
Selenium-HTML
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
<!doctype html><html lang=en class=no-js><head><meta charset=utf-8><meta name=viewport content="width=device-width,initial-scale=1,shrink-to-fit=no"><meta name=generator content="Hugo 0.83.1"><link rel=alternate type=text/html href=/documentation/_print/><meta name=ROBOTS content="INDEX, FOLLOW"><link rel="shortcut icon" href=/favicons/favicon.ico><link rel=apple-touch-icon href=/favicons/apple-touch-icon-180x180.png sizes=180x180><link rel=icon type=image/png href=/favicons/favicon-16x16.png sizes=16x16><link rel=icon type=image/png href=/favicons/favicon-32x32.png sizes=32x32><link rel=icon type=image/png href=/favicons/android-36x36.png sizes=36x36><link rel=icon type=image/png href=/favicons/android-48x48.png sizes=48x48><link rel=icon type=image/png href=/favicons/android-72x72.png sizes=72x72><link rel=icon type=image/png href=/favicons/android-96x96.png sizes=96x96><link rel=icon type=image/png href=/favicons/android-144x144.png sizes=144x144><link rel=icon type=image/png href=/favicons/android-192x192.png sizes=192x192><title>The Selenium Browser Automation Project | Selenium</title><meta name=description content="Selenium is an umbrella project for a range of tools and libraries
that enable and support the automation of web browsers.
It provides extensions to …"><meta property="og:title" content="The Selenium Browser Automation Project"><meta property="og:description" content="Selenium automates browsers. That's it!"><meta property="og:type" content="website"><meta property="og:url" content="/documentation/"><meta property="og:image" content="/images/selenium_4_logo.png"><meta property="og:site_name" content="Selenium"><meta itemprop=name content="The Selenium Browser Automation Project"><meta itemprop=description content="Selenium automates browsers. That's it!"><meta name=twitter:card content="summary_large_image"><meta name=twitter:image content="/images/selenium_4_logo.png"><meta name=twitter:title content="The Selenium Browser Automation Project"><meta name=twitter:description content="Selenium automates browsers. That's it!"><link rel=preload href=/scss/main.min.9dfeff3fd02d7e6770041efaeaa2d7e9ecd602e820f926eb6921691c1f253d02.css as=style><link href=/scss/main.min.9dfeff3fd02d7e6770041efaeaa2d7e9ecd602e820f926eb6921691c1f253d02.css rel=stylesheet integrity><script src=https://code.jquery.com/jquery-3.5.1.min.js integrity="sha256-9/aliU8dGd2tb6OSsuzixeV4y/faTqgFtohetphbbj0=" crossorigin=anonymous></script><link rel=stylesheet href=/css/prism.css><link rel=stylesheet href=https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.css></head><body class=td-section><header><nav class="js-navbar-scroll navbar navbar-expand-lg navbar-dark navbar-color td-navbar"><a class=navbar-brand href=/><span class=navbar-logo><svg id="selenium_logo" data-name="Selenium Logo" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 139.38 34"><defs><style>.cls-selenium_logo{fill:#fff}</style></defs><title>Selenium</title><path class="cls-selenium_logo" d="M46.2 26.37a18.85 18.85.0 01-2.57-.2 25 25 0 01-2.74-.53v-1.39a25.31 25.31.0 002.71.53 18 18 0 002.5.2 5.51 5.51.0 003.29-.84 2.79 2.79.0 001.14-2.39 2.85 2.85.0 00-1.24-2.49A6 6 0 0048 18.55q-.78-.29-1.67-.55A15.93 15.93.0 0144 17.13a5.92 5.92.0 01-1.58-1.05 3.6 3.6.0 01-.9-1.34A5 5 0 0141.23 13a4.46 4.46.0 01.41-1.93 4.31 4.31.0 011.17-1.5 5.26 5.26.0 011.82-1A8 8 0 0147 8.28a20.51 20.51.0 014.41.57v1.42a20 20 0 00-2.23-.44 15.2 15.2.0 00-2-.15 4.86 4.86.0 00-3.08.9A2.9 2.9.0 0042.88 13a3.25 3.25.0 00.21 1.21 2.61 2.61.0 00.7 1 4.83 4.83.0 001.27.79 14.31 14.31.0 002 .68q1.11.33 2.06.71a6.21 6.21.0 011.65.94 4.09 4.09.0 011.1 1.38 4.54 4.54.0 01.4 2 4.15 4.15.0 01-1.56 3.48A7.16 7.16.0 0146.2 26.37z"/><path class="cls-selenium_logo" d="M60.62 26.32a5.46 5.46.0 01-4.28-1.62A6.9 6.9.0 0154.88 20a7.8 7.8.0 011.43-5 5 5 0 014.14-1.75 4.24 4.24.0 013.47 1.43A6.48 6.48.0 0165.1 18.8q0 .54.0.92a3.22 3.22.0 01-.09.64H56.44a5.39 5.39.0 001.17 3.5A4.18 4.18.0 0060.8 25a10.52 10.52.0 001.82-.17 11.77 11.77.0 001.93-.52l.12 1.27a10.68 10.68.0 01-2 .55A11.47 11.47.0 0160.62 26.32zM60.4 14.43q-3.68.0-3.94 4.74h7.15a6.49 6.49.0 00-.78-3.63A2.76 2.76.0 0060.4 14.43z"/><path class="cls-selenium_logo" d="M68.64 7h1.58V26.11H68.64z"/><path class="cls-selenium_logo" d="M79.56 26.32a5.46 5.46.0 01-4.28-1.62A6.9 6.9.0 0173.83 20a7.8 7.8.0 011.43-5 5 5 0 014.14-1.75 4.24 4.24.0 013.47 1.43A6.48 6.48.0 0184 18.8q0 .54.0.92a3.22 3.22.0 01-.09.64H75.38a5.4 5.4.0 001.17 3.5A4.18 4.18.0 0079.75 25a10.52 10.52.0 001.82-.17 11.8 11.8.0 001.93-.52l.12 1.27a10.68 10.68.0 01-2 .55A11.47 11.47.0 0179.56 26.32zm-.21-11.89q-3.68.0-3.94 4.74h7.15a6.49 6.49.0 00-.78-3.63A2.76 2.76.0 0079.35 14.43z"/><path class="cls-selenium_logo" d="M87.51 13.37h1.32l.12 1.49h.12q.94-.45 1.72-.78t1.43-.54a8.42 8.42.0 011.2-.31 6.54 6.54.0 011.1-.09A3.3 3.3.0 0197 14a3.63 3.63.0 01.83 2.63v9.51H96.24v-9a3 3 0 00-.55-2 2.18 2.18.0 00-1.69-.6 7.25 7.25.0 00-2.24.41 20.1 20.1.0 00-2.67 1.12v10H87.51z"/><path class="cls-selenium_logo" d="M102.75 10.52a.93.93.0 01-1.06-1 1.06 1.06.0 012.12.0.93.93.0 01-1.06 1zm-.8 2.85h1.58V26.11h-1.58z"/><path class="cls-selenium_logo" d="M110.81 26.34q-3.14.0-3.14-3.47v-9.5h1.58v9a3.16 3.16.0 00.48 2 1.92 1.92.0 001.59.6 6.83 6.83.0 002.48-.48q1.25-.48 2.59-1.14V13.37H118V26.11h-1.32l-.12-1.58h-.09l-1.73.81q-.74.34-1.38.57a7.9 7.9.0 01-1.23.33A7.34 7.34.0 01110.81 26.34z"/><path class="cls-selenium_logo" d="M122.18 13.37h1.3l.14 1.49h.09a19.53 19.53.0 012.58-1.31 5.51 5.51.0 012-.41 2.83 2.83.0 013 1.77h.12q.8-.5 1.45-.83a12.61 12.61.0 011.2-.54 6.17 6.17.0 011-.31 5.18 5.18.0 011-.09 3.3 3.3.0 012.45.84 3.63 3.63.0 01.83 2.63v9.51h-1.56v-9a2.9 2.9.0 00-.55-2 2.21 2.21.0 00-1.69-.59 5.14 5.14.0 00-1.78.38A14.45 14.45.0 00131.6 16v10.1H130v-9a2.9 2.9.0 00-.55-2 2.21 2.21.0 00-1.69-.59 5.24 5.24.0 00-1.86.4A14 14 0 00123.76 16V26.11h-1.58z"/><path class="cls-selenium_logo" d="M21.45 21.51a2.49 2.49.0 00-2.55 2.21.08.08.0 00.08.1h4.95a.08.08.0 00.08-.09 2.41 2.41.0 00-2.56-2.22z"/><path class="cls-selenium_logo" d="M32.06 4.91 21.56 16.7a.32.32.0 01-.47.0l-5.36-5.53a.32.32.0 010-.4L17.5 8.5a.32.32.0 01.52.0l3 3.32a.32.32.0 00.49.0L29.87.36A.23.23.0 0029.69.0H.25A.25.25.0 000 .25v33.5A.25.25.0 00.25 34h32a.25.25.0 00.25-.25V5.06A.23.23.0 0032.06 4.91zm-23 25.36a8.08 8.08.0 01-5.74-2 .31.31.0 010-.41l1.25-1.75A.31.31.0 015 26a6.15 6.15.0 004.2 1.64c1.64.0 2.44-.76 2.44-1.56.0-2.48-8.08-.78-8.08-6.06.0-2.33 2-4.27 5.32-4.27a7.88 7.88.0 015.25 1.76.31.31.0 010 .43L12.9 19.65a.31.31.0 01-.45.05 6.08 6.08.0 00-3.84-1.32c-1.28.0-2 .57-2 1.41.0 2.23 8.06.74 8.06 6C14.67 28.33 12.84 30.27 9.05 30.27zM26.68 25.4a.27.27.0 01-.28.28H19a.09.09.0 00-.08.1 2.81 2.81.0 003 2.32 4.62 4.62.0 002.56-.84.27.27.0 01.4.06l.9 1.31a.28.28.0 01-.06.37 6.67 6.67.0 01-4.1 1.28 5.28 5.28.0 01-5.57-5.48 5.31 5.31.0 015.4-5.46c3.11.0 5.22 2.33 5.22 5.74z"/></svg></span></a><button class=navbar-toggler type=button data-toggle=collapse data-target=#main_navbar aria-controls=main_navbar aria-expanded=false aria-label="Toggle navigation">
<span class=navbar-toggler-icon></span></button><div class="collapse navbar-collapse justify-content-end" id=main_navbar><ul class="navbar-nav mr-4 mb-2 mb-lg-0 pl-4 pl-lg-2"><li class="nav-item mr-4 mb-2 mb-lg-0"><li class="nav-item dropdown"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>About</a><div class=dropdown-menu aria-labelledby=navbarDropdown><a class=dropdown-item href=/about>About Selenium</a>
<a class=dropdown-item href=/project>Structure and Governance</a>
<a class=dropdown-item href=/events>Events</a>
<a class=dropdown-item href=/ecosystem>Ecosystem</a>
<a class=dropdown-item href=/history>History</a>
<a class=dropdown-item href=/getinvolved>Get Involved</a>
<a class=dropdown-item href=/sponsors>Sponsors</a></div></li></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/downloads><span>Downloads</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/documentation><span>Documentation</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/projects><span>Projects</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/support><span>Support</span></a></li><li class="nav-item mr-4 mb-2 mb-lg-0"><a class=nav-link href=/blog><span>Blog</span></a></li><li class="nav-item dropdown d-none d-lg-block"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>English</a><div class=dropdown-menu aria-labelledby=navbarDropdownMenuLink><a class=dropdown-item href=/es/documentation/>Español</a>
<a class=dropdown-item href=/de/documentation/>Deutsch</a>
<a class=dropdown-item href=/pt-br/documentation/>Português (Brasileiro)</a>
<a class=dropdown-item href=/nl/documentation/>Nederlands</a>
<a class=dropdown-item href=/zh-cn/documentation/>中文简体</a>
<a class=dropdown-item href=/fr/documentation/>Français</a>
<a class=dropdown-item href=/ja/documentation/>日本語</a>
<a class=dropdown-item href=/ko/documentation/>한국어</a></div></li></ul><div class=navbar-nav><input type=search class="form-control td-search-input" placeholder=" Search this site…" aria-label="Search this site…" autocomplete=off></div></div></nav></header><div class="container-fluid td-outer"><div class=td-main><div class="row flex-xl-nowrap"><aside class="col-12 col-md-3 col-xl-2 td-sidebar d-print-none"><div id=td-sidebar-menu class=td-sidebar__inner><div id=content-mobile><form class="td-sidebar__search d-flex align-items-center"><input type=search class="form-control td-search-input" placeholder=" Search this site…" aria-label="Search this site…" autocomplete=off>
<button class="btn btn-link td-sidebar__toggle d-md-none p-0 ml-3 fas fa-bars" type=button data-toggle=collapse data-target=#td-section-nav aria-controls=td-docs-nav aria-expanded=false aria-label="Toggle section navigation"></button></form></div><div id=content-desktop></div><nav class="collapse td-sidebar-nav" id=td-section-nav><div class="nav-item dropdown d-block d-lg-none"><a class="nav-link dropdown-toggle" href=# id=navbarDropdown role=button data-toggle=dropdown aria-haspopup=true aria-expanded=false>English</a><div class=dropdown-menu aria-labelledby=navbarDropdownMenuLink><a class=dropdown-item href=/es/documentation/>Español</a>
<a class=dropdown-item href=/de/documentation/>Deutsch</a>
<a class=dropdown-item href=/pt-br/documentation/>Português (Brasileiro)</a>
<a class=dropdown-item href=/nl/documentation/>Nederlands</a>
<a class=dropdown-item href=/zh-cn/documentation/>中文简体</a>
<a class=dropdown-item href=/fr/documentation/>Français</a>
<a class=dropdown-item href=/ja/documentation/>日本語</a>
<a class=dropdown-item href=/ko/documentation/>한국어</a></div></div><ul class="td-sidebar-nav__section pr-md-3 ul-0"><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child active-path" id=m-documentation-li><a href=/documentation/ title="The Selenium Browser Automation Project" class="align-left pl-0 active td-sidebar-link td-sidebar-link__section tree-root" id=m-documentation><span class=td-sidebar-nav-active-item>Documentation</span></a><ul class=ul-1><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationoverview-li><a href=/documentation/overview/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationoverview><span>Overview</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationoverviewa_deeper_look-li><a href=/documentation/overview/a_deeper_look/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationoverviewa_deeper_look><span>A Deeper Look</span></a></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationgetting_started-li><a href=/documentation/getting_started/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationgetting_started><span>Getting Started</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgetting_startedinstalling_selenium_libraries-li><a href=/documentation/getting_started/installing_selenium_libraries/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgetting_startedinstalling_selenium_libraries><span>Installing Selenium libraries</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgetting_startedinstalling_browser_drivers-li><a href=/documentation/getting_started/installing_browser_drivers/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgetting_startedinstalling_browser_drivers><span>Installing browser drivers</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgetting_startedhow_to_upgrade_to_selenium_4-li><a href=/documentation/getting_started/how_to_upgrade_to_selenium_4/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgetting_startedhow_to_upgrade_to_selenium_4><span>How to upgrade to Selenium 4</span></a></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationwebdriver-li><a href=/documentation/webdriver/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationwebdriver><span>WebDriver</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverunderstanding_the_components-li><a href=/documentation/webdriver/understanding_the_components/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverunderstanding_the_components><span>Understanding the components</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverbrowser_manipulation-li><a href=/documentation/webdriver/browser_manipulation/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverbrowser_manipulation><span>Browser manipulation</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverlocating_elements-li><a href=/documentation/webdriver/locating_elements/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverlocating_elements><span>Locating elements</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverwaits-li><a href=/documentation/webdriver/waits/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverwaits><span>Waits</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverjs_alerts_prompts_and_confirmations-li><a href=/documentation/webdriver/js_alerts_prompts_and_confirmations/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverjs_alerts_prompts_and_confirmations><span>JavaScript alerts, prompts and confirmations</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverhttp_proxies-li><a href=/documentation/webdriver/http_proxies/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverhttp_proxies><span>Http proxies</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverpage_loading_strategy-li><a href=/documentation/webdriver/page_loading_strategy/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverpage_loading_strategy><span>Page loading strategy</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverweb_element-li><a href=/documentation/webdriver/web_element/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverweb_element><span>Web element</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverkeyboard-li><a href=/documentation/webdriver/keyboard/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverkeyboard><span>Keyboard</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverremote_webdriver-li><a href=/documentation/webdriver/remote_webdriver/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverremote_webdriver><span>Remote WebDriver</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdriverbidi_apis-li><a href=/documentation/webdriver/bidi_apis/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdriverbidi_apis><span>BiDi APIs</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child collapse" id=m-documentationwebdrivercapabilities-li><a href=/documentation/webdriver/capabilities/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationwebdrivercapabilities><span>Capabilities</span></a><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdrivercapabilitiesshared_capabilities-li><a href=/documentation/webdriver/capabilities/shared_capabilities/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdrivercapabilitiesshared_capabilities><span>Shared capabilities</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationwebdrivercapabilitiesdriver_specific_capabilities-li><a href=/documentation/webdriver/capabilities/driver_specific_capabilities/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationwebdrivercapabilitiesdriver_specific_capabilities><span>Driver specific capabilities</span></a></li></ul></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationguidelines-li><a href=/documentation/guidelines/ title="Guidelines and recommendations" class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationguidelines><span>Guidelines</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelineson_test_automation-li><a href=/documentation/guidelines/on_test_automation/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelineson_test_automation><span>On test automation</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinestypes_of_testing-li><a href=/documentation/guidelines/types_of_testing/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinestypes_of_testing><span>Types of testing</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinespage_object_models-li><a href=/documentation/guidelines/page_object_models/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinespage_object_models><span>Page object models</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinesdomain_specific_language-li><a href=/documentation/guidelines/domain_specific_language/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinesdomain_specific_language><span>Domain specific language</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinesgenerating_application_state-li><a href=/documentation/guidelines/generating_application_state/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinesgenerating_application_state><span>Generating application state</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinesmock_external_services-li><a href=/documentation/guidelines/mock_external_services/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinesmock_external_services><span>Mock external services</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinesimproved_reporting-li><a href=/documentation/guidelines/improved_reporting/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinesimproved_reporting><span>Improved reporting</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinesavoid_sharing_state-li><a href=/documentation/guidelines/avoid_sharing_state/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinesavoid_sharing_state><span>Avoid sharing state</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinestest_independency-li><a href=/documentation/guidelines/test_independency/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinestest_independency><span>Test independency</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinesconsider_using_a_fluent_api-li><a href=/documentation/guidelines/consider_using_a_fluent_api/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinesconsider_using_a_fluent_api><span>Consider using a fluent API</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationguidelinesfresh_browser_per_test-li><a href=/documentation/guidelines/fresh_browser_per_test/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationguidelinesfresh_browser_per_test><span>Fresh browser per test</span></a></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationworst_practices-li><a href=/documentation/worst_practices/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationworst_practices><span>Worst practices</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationworst_practicescaptchas-li><a href=/documentation/worst_practices/captchas/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationworst_practicescaptchas><span>Captchas</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationworst_practicesfile_downloads-li><a href=/documentation/worst_practices/file_downloads/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationworst_practicesfile_downloads><span>File downloads</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationworst_practiceshttp_response_codes-li><a href=/documentation/worst_practices/http_response_codes/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationworst_practiceshttp_response_codes><span>HTTP response codes</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationworst_practicesgmail_email_and_facebook_logins-li><a href=/documentation/worst_practices/gmail_email_and_facebook_logins/ title="Gmail, email and Facebook logins" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationworst_practicesgmail_email_and_facebook_logins><span>Gmail, email and Facebook</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationworst_practicestest_dependency-li><a href=/documentation/worst_practices/test_dependency/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationworst_practicestest_dependency><span>Test dependency</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationworst_practicesperformance_testing-li><a href=/documentation/worst_practices/performance_testing/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationworst_practicesperformance_testing><span>Performance testing</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationworst_practiceslink_spidering-li><a href=/documentation/worst_practices/link_spidering/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationworst_practiceslink_spidering><span>Link spidering</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationworst_practicestwo_factor_authentication-li><a href=/documentation/worst_practices/two_factor_authentication/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationworst_practicestwo_factor_authentication><span>Two Factor Authentication</span></a></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationgrid-li><a href=/documentation/grid/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationgrid><span>Grid</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridcomponents_of_a_grid-li><a href=/documentation/grid/components_of_a_grid/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridcomponents_of_a_grid><span>Components</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridsetting_up_your_own_grid-li><a href=/documentation/grid/setting_up_your_own_grid/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridsetting_up_your_own_grid><span>Setting up your own</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child collapse" id=m-documentationgridconfiguring_components-li><a href=/documentation/grid/configuring_components/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationgridconfiguring_components><span>Configuring Components</span></a><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridconfiguring_componentsconfig_help-li><a href=/documentation/grid/configuring_components/config_help/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridconfiguring_componentsconfig_help><span>Config help</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridconfiguring_componentscli_options-li><a href=/documentation/grid/configuring_components/cli_options/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridconfiguring_componentscli_options><span>CLI Options</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridconfiguring_componentstoml_options-li><a href=/documentation/grid/configuring_components/toml_options/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridconfiguring_componentstoml_options><span>Toml Options</span></a></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child collapse" id=m-documentationgridadvanced_features-li><a href=/documentation/grid/advanced_features/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationgridadvanced_features><span>Advanced Features</span></a><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridadvanced_featuresobservability-li><a href=/documentation/grid/advanced_features/observability/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridadvanced_featuresobservability><span>Observability</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridadvanced_featuresgraphql_support-li><a href=/documentation/grid/advanced_features/graphql_support/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridadvanced_featuresgraphql_support><span>GraphQL Query Support</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridadvanced_featuresgrid_endpoints-li><a href=/documentation/grid/advanced_features/grid_endpoints/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridadvanced_featuresgrid_endpoints><span>Grid Endpoints</span></a></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationgridwhen_to_use_grid-li><a href=/documentation/grid/when_to_use_grid/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationgridwhen_to_use_grid><span>When to use Grid</span></a></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationsupport_packages-li><a href=/documentation/support_packages/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationsupport_packages><span>Support Packages</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationsupport_packagesworking_with_colours-li><a href=/documentation/support_packages/working_with_colours/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationsupport_packagesworking_with_colours><span>Working with colours</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationsupport_packagesworking_with_select_elements-li><a href=/documentation/support_packages/working_with_select_elements/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationsupport_packagesworking_with_select_elements><span>Working with select elements</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationsupport_packagesmouse_and_keyboard_actions_in_detail-li><a href=/documentation/support_packages/mouse_and_keyboard_actions_in_detail/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationsupport_packagesmouse_and_keyboard_actions_in_detail><span>Mouse actions in detail</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationsupport_packagesworking_with_cookies-li><a href=/documentation/support_packages/working_with_cookies/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationsupport_packagesworking_with_cookies><span>Working with cookies</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationsupport_packageschrome_devtools-li><a href=/documentation/support_packages/chrome_devtools/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationsupport_packageschrome_devtools><span>Chrome DevTools Protocol</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationsupport_packagesthread_guard-li><a href=/documentation/support_packages/thread_guard/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationsupport_packagesthread_guard><span>ThreadGuard</span></a></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationlegacy-li><a href=/documentation/legacy/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationlegacy><span>Legacy</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationlegacyselenium_rc-li><a href=/documentation/legacy/selenium_rc/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationlegacyselenium_rc><span>Selenium 1 (Selenium RC)</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationlegacymigrating_from_rc_to_webdriver-li><a href=/documentation/legacy/migrating_from_rc_to_webdriver/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationlegacymigrating_from_rc_to_webdriver><span>Migrating from RC to WebDriver</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationlegacyhtml_runner-li><a href=/documentation/legacy/html_runner/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationlegacyhtml_runner><span>HTML runner</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationlegacyselenium_ide-li><a href=/documentation/legacy/selenium_ide/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationlegacyselenium_ide><span>Legacy Selenium IDE</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationlegacyremote_webdriver_server-li><a href=/documentation/legacy/remote_webdriver_server/ title="Remote WebDriver server" class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationlegacyremote_webdriver_server><span>Remote WebDriver Server</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child collapse" id=m-documentationlegacygrid_3-li><a href=/documentation/legacy/grid_3/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationlegacygrid_3><span>Grid 3</span></a><ul class="ul-3 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationlegacygrid_3components_of_a_grid-li><a href=/documentation/legacy/grid_3/components_of_a_grid/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationlegacygrid_3components_of_a_grid><span>Components</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationlegacygrid_3setting_up_your_own_grid-li><a href=/documentation/legacy/grid_3/setting_up_your_own_grid/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationlegacygrid_3setting_up_your_own_grid><span>Setting up your own</span></a></li></ul></li></ul></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section with-child" id=m-documentationabout-li><a href=/documentation/about/ class="align-left pl-0 td-sidebar-link td-sidebar-link__section" id=m-documentationabout><span>About this documentation</span></a><ul class="ul-2 foldable"><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationaboutcopyright_and_attributions-li><a href=/documentation/about/copyright_and_attributions/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationaboutcopyright_and_attributions><span>Copyright and attributions</span></a></li><li class="td-sidebar-nav__section-title td-sidebar-nav__section without-child collapse" id=m-documentationaboutcontributing-li><a href=/documentation/about/contributing/ class="align-left pl-0 td-sidebar-link td-sidebar-link__page" id=m-documentationaboutcontributing><span>Contributing to the Selenium Site & Documentation</span></a></li></ul></li></ul></li></ul></nav></div></aside><aside class="d-none d-xl-block col-xl-2 td-sidebar-toc d-print-none"><div class="td-page-meta ml-2 pb-1 pt-2 mb-0"><a href=https://github.com/SeleniumHQ/seleniumhq.github.io/edit/dev/website_and_docs/content/documentation/_index.en.md target=_blank><i class="fa fa-edit fa-fw"></i> Edit this page</a>
<a href="https://github.com/SeleniumHQ/seleniumhq.github.io/issues/new?title=The%20Selenium%20Browser%20Automation%20Project" target=_blank><i class="fab fa-github fa-fw"></i> Create documentation issue</a>
<a href=https://github.com/seleniumhq/selenium/issues/new target=_blank><i class="fas fa-tasks fa-fw"></i> Create project issue</a>
<a id=print href=/documentation/_print/><i class="fa fa-print fa-fw"></i> Print entire section</a></div><hr></aside><main class="col-12 col-md-9 col-xl-8 pl-md-5" role=main><nav aria-label=breadcrumb class="d-none d-md-block d-print-none"><ol class="breadcrumb spb-1"><li class="breadcrumb-item active" aria-current=page><a href=/documentation/>Documentation</a></li></ol></nav><div class=td-content><h1>The Selenium Browser Automation Project</h1><header class=article-meta></header><p>Selenium is an umbrella project for a range of tools and libraries
that enable and support the automation of web browsers.</p><p>It provides extensions to emulate user interaction with browsers,
a distribution server for scaling browser allocation,
and the infrastructure for implementations of the
<a href=//www.w3.org/TR/webdriver/>W3C WebDriver specification</a>
that lets you write interchangeable code for all major web browsers.</p><p>This project is made possible by volunteer contributors
who have put in thousands of hours of their own time,
and made the source code
<a href=/documentation/about/copyright_and_attributions/#license>freely available</a>
for anyone to use, enjoy, and improve.</p><p>Selenium brings together browser vendors, engineers, and enthusiasts
to further an open discussion around automation of the web platform.
The project organises <a href=//seleniumconf.com/>an annual conference</a>
to teach and nurture the community.</p><p>At the core of Selenium is <a href=/documentation/webdriver>WebDriver</a>,
an interface to write instruction sets that can be run interchangeably in many
browsers. Here is one of the simplest instructions you can make:</p><ul class="nav nav-tabs" id=tabs-1 role=tablist><li class=nav-item><a class="nav-link active tab-Java" id=tabs-1-0-tab data-toggle=tab href=#tabs-1-0 role=tab onclick='handleClick("Java")' aria-controls=tabs-1-0 aria-selected=true>Java</a></li><li class=nav-item><a class="nav-link tab-Python" id=tabs-1-1-tab data-toggle=tab href=#tabs-1-1 role=tab onclick='handleClick("Python")' aria-controls=tabs-1-1 aria-selected=false>Python</a></li><li class=nav-item><a class="nav-link tab-CSharp" id=tabs-1-2-tab data-toggle=tab href=#tabs-1-2 role=tab onclick='handleClick("CSharp")' aria-controls=tabs-1-2 aria-selected=false>CSharp</a></li><li class=nav-item><a class="nav-link tab-Ruby" id=tabs-1-3-tab data-toggle=tab href=#tabs-1-3 role=tab onclick='handleClick("Ruby")' aria-controls=tabs-1-3 aria-selected=false>Ruby</a></li><li class=nav-item><a class="nav-link tab-JavaScript" id=tabs-1-4-tab data-toggle=tab href=#tabs-1-4 role=tab onclick='handleClick("JavaScript")' aria-controls=tabs-1-4 aria-selected=false>JavaScript</a></li><li class=nav-item><a class="nav-link tab-Kotlin" id=tabs-1-5-tab data-toggle=tab href=#tabs-1-5 role=tab onclick='handleClick("Kotlin")' aria-controls=tabs-1-5 aria-selected=false>Kotlin</a></li></ul><div class=tab-content id=tabs-1-content><div class="tab-pane fade show active" id=tabs-1-0 role=tabpanel aria-labelled-by=tabs-1-0-tab><div class=highlight><pre style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-Java data-lang=Java><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.By</span><span style=color:#ce5c00;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.Keys</span><span style=color:#ce5c00;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.WebDriver</span><span style=color:#ce5c00;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.WebElement</span><span style=color:#ce5c00;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.firefox.FirefoxDriver</span><span style=color:#ce5c00;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.support.ui.WebDriverWait</span><span style=color:#ce5c00;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>import static</span> <span style=color:#000>org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated</span><span style=color:#ce5c00;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.time.Duration</span><span style=color:#ce5c00;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>HelloSelenium</span> <span style=color:#ce5c00;font-weight:700>{</span>
<span style=color:#204a87;font-weight:700>public</span> <span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>main</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>String</span><span style=color:#ce5c00;font-weight:700>[]</span> <span style=color:#000>args</span><span style=color:#ce5c00;font-weight:700>)</span> <span style=color:#ce5c00;font-weight:700>{</span>
<span style=color:#000>WebDriver</span> <span style=color:#000>driver</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>FirefoxDriver</span><span style=color:#ce5c00;font-weight:700>();</span>
<span style=color:#000>WebDriverWait</span> <span style=color:#000>wait</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>WebDriverWait</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>,</span> <span style=color:#000>Duration</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ofSeconds</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>10</span><span style=color:#ce5c00;font-weight:700>));</span>
<span style=color:#204a87;font-weight:700>try</span> <span style=color:#ce5c00;font-weight:700>{</span>
<span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>get</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>"https://google.com/ncr"</span><span style=color:#ce5c00;font-weight:700>);</span>
<span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>findElement</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>name</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>"q"</span><span style=color:#ce5c00;font-weight:700>)).</span><span style=color:#c4a000>sendKeys</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>"cheese"</span> <span style=color:#ce5c00;font-weight:700>+</span> <span style=color:#000>Keys</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>ENTER</span><span style=color:#ce5c00;font-weight:700>);</span>
<span style=color:#000>WebElement</span> <span style=color:#000>firstResult</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>wait</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>until</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>presenceOfElementLocated</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>cssSelector</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>"h3"</span><span style=color:#ce5c00;font-weight:700>)));</span>
<span style=color:#000>System</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>out</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>println</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#000>firstResult</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>getAttribute</span><span style=color:#ce5c00;font-weight:700>(</span><span style=color:#4e9a06>"textContent"</span><span style=color:#ce5c00;font-weight:700>));</span>
<span style=color:#ce5c00;font-weight:700>}</span> <span style=color:#204a87;font-weight:700>finally</span> <span style=color:#ce5c00;font-weight:700>{</span>
<span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#c4a000>quit</span><span style=color:#ce5c00;font-weight:700>();</span>
<span style=color:#ce5c00;font-weight:700>}</span>
<span style=color:#ce5c00;font-weight:700>}</span>
<span style=color:#ce5c00;font-weight:700>}</span>
</code></pre></div></div><div class="tab-pane fade" id=tabs-1-1 role=tabpanel aria-labelled-by=tabs-1-1-tab><div class=highlight><pre style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-Python data-lang=Python><span style=color:#204a87;font-weight:700>from</span> <span style=color:#000>selenium</span> <span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>webdriver</span>
<span style=color:#204a87;font-weight:700>from</span> <span style=color:#000>selenium.webdriver.common.by</span> <span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>By</span>
<span style=color:#204a87;font-weight:700>from</span> <span style=color:#000>selenium.webdriver.common.keys</span> <span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>Keys</span>
<span style=color:#204a87;font-weight:700>from</span> <span style=color:#000>selenium.webdriver.support.ui</span> <span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>WebDriverWait</span>
<span style=color:#204a87;font-weight:700>from</span> <span style=color:#000>selenium.webdriver.support.expected_conditions</span> <span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>presence_of_element_located</span>
<span style=color:#8f5902;font-style:italic>#This example requires Selenium WebDriver 3.13 or newer</span>
<span style=color:#204a87;font-weight:700>with</span> <span style=color:#000>webdriver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>Firefox</span><span style=color:#000;font-weight:700>()</span> <span style=color:#204a87;font-weight:700>as</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>:</span>
<span style=color:#000>wait</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>WebDriverWait</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>driver</span><span style=color:#000;font-weight:700>,</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>)</span>
<span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>get</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"https://google.com/ncr"</span><span style=color:#000;font-weight:700>)</span>
<span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>find_element</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>NAME</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>"q"</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>send_keys</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"cheese"</span> <span style=color:#ce5c00;font-weight:700>+</span> <span style=color:#000>Keys</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>RETURN</span><span style=color:#000;font-weight:700>)</span>
<span style=color:#000>first_result</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>wait</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>until</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>presence_of_element_located</span><span style=color:#000;font-weight:700>((</span><span style=color:#000>By</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>CSS_SELECTOR</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>"h3"</span><span style=color:#000;font-weight:700>)))</span>
<span style=color:#204a87;font-weight:700>print</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>first_result</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>get_attribute</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"textContent"</span><span style=color:#000;font-weight:700>))</span>
</code></pre></div></div><div class="tab-pane fade" id=tabs-1-2 role=tabpanel aria-labelled-by=tabs-1-2-tab><div class=highlight><pre style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-CSharp data-lang=CSharp><span style=color:#204a87;font-weight:700>using</span> <span style=color:#000>System</span><span style=color:#000;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>using</span> <span style=color:#000>OpenQA.Selenium</span><span style=color:#000;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>using</span> <span style=color:#000>OpenQA.Selenium.Firefox</span><span style=color:#000;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>using</span> <span style=color:#000>OpenQA.Selenium.Support.UI</span><span style=color:#000;font-weight:700>;</span>
<span style=color:#204a87;font-weight:700>class</span> <span style=color:#000>HelloSelenium</span> <span style=color:#000;font-weight:700>{</span>
<span style=color:#204a87;font-weight:700>static</span> <span style=color:#204a87;font-weight:700>void</span> <span style=color:#000>Main</span><span style=color:#000;font-weight:700>()</span> <span style=color:#000;font-weight:700>{</span>
<span style=color:#000>using</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>IWebDriver</span> <span style=color:#000>driver</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>FirefoxDriver</span><span style=color:#000;font-weight:700>())</span> <span style=color:#000;font-weight:700>{</span>
<span style=color:#000>WebDriverWait</span> <span style=color:#000>wait</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>WebDriverWait</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>driver</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>TimeSpan</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>FromSeconds</span><span style=color:#000;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>));</span>
<span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>Navigate</span><span style=color:#000;font-weight:700>().</span><span style=color:#000>GoToUrl</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"https://www.google.com/ncr"</span><span style=color:#000;font-weight:700>);</span>
<span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>FindElement</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>Name</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"q"</span><span style=color:#000;font-weight:700>)).</span><span style=color:#000>SendKeys</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"cheese"</span> <span style=color:#000;font-weight:700>+</span> <span style=color:#000>Keys</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>Enter</span><span style=color:#000;font-weight:700>);</span>
<span style=color:#000>wait</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>Until</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>webDriver</span> <span style=color:#000;font-weight:700>=></span> <span style=color:#000>webDriver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>FindElement</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>CssSelector</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"h3"</span><span style=color:#000;font-weight:700>)).</span><span style=color:#000>Displayed</span><span style=color:#000;font-weight:700>);</span>
<span style=color:#000>IWebElement</span> <span style=color:#000>firstResult</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>FindElement</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>CssSelector</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"h3"</span><span style=color:#000;font-weight:700>));</span>
<span style=color:#000>Console</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>WriteLine</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>firstResult</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>GetAttribute</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"textContent"</span><span style=color:#000;font-weight:700>));</span>
<span style=color:#000;font-weight:700>}</span>
<span style=color:#000;font-weight:700>}</span>
<span style=color:#000;font-weight:700>}</span>
</code></pre></div></div><div class="tab-pane fade" id=tabs-1-3 role=tabpanel aria-labelled-by=tabs-1-3-tab><div class=highlight><pre style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-Ruby data-lang=Ruby><span style=color:#204a87>require</span> <span style=color:#4e9a06>'selenium-webdriver'</span>
<span style=color:#000>driver</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>Selenium</span><span style=color:#ce5c00;font-weight:700>::</span><span style=color:#000>WebDriver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>for</span> <span style=color:#4e9a06>:firefox</span>
<span style=color:#000>wait</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>Selenium</span><span style=color:#ce5c00;font-weight:700>::</span><span style=color:#000>WebDriver</span><span style=color:#ce5c00;font-weight:700>::</span><span style=color:#000>Wait</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>new</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>timeout</span><span style=color:#000;font-weight:700>:</span> <span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>)</span>
<span style=color:#204a87;font-weight:700>begin</span>
<span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>get</span> <span style=color:#4e9a06>'https://google.com/ncr'</span>
<span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>find_element</span><span style=color:#000;font-weight:700>(</span><span style=color:#204a87>name</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>'q'</span><span style=color:#000;font-weight:700>)</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>send_keys</span> <span style=color:#4e9a06>'cheese'</span><span style=color:#000;font-weight:700>,</span> <span style=color:#4e9a06>:return</span>
<span style=color:#000>first_result</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>wait</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>until</span> <span style=color:#000;font-weight:700>{</span> <span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>find_element</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>css</span><span style=color:#000;font-weight:700>:</span> <span style=color:#4e9a06>'h3'</span><span style=color:#000;font-weight:700>)</span> <span style=color:#000;font-weight:700>}</span>
<span style=color:#204a87>puts</span> <span style=color:#000>first_result</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>attribute</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>'textContent'</span><span style=color:#000;font-weight:700>)</span>
<span style=color:#204a87;font-weight:700>ensure</span>
<span style=color:#000>driver</span><span style=color:#ce5c00;font-weight:700>.</span><span style=color:#000>quit</span>
<span style=color:#204a87;font-weight:700>end</span>
</code></pre></div></div><div class="tab-pane fade" id=tabs-1-4 role=tabpanel aria-labelled-by=tabs-1-4-tab><div class=highlight><pre style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-JavaScript data-lang=JavaScript><span style=color:#204a87;font-weight:700>const</span> <span style=color:#000;font-weight:700>{</span><span style=color:#000>Builder</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>By</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>Key</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>until</span><span style=color:#000;font-weight:700>}</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#000>require</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>'selenium-webdriver'</span><span style=color:#000;font-weight:700>);</span>
<span style=color:#000;font-weight:700>(</span><span style=color:#204a87;font-weight:700>async</span> <span style=color:#204a87;font-weight:700>function</span> <span style=color:#000>example</span><span style=color:#000;font-weight:700>()</span> <span style=color:#000;font-weight:700>{</span>
<span style=color:#204a87;font-weight:700>let</span> <span style=color:#000>driver</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>await</span> <span style=color:#204a87;font-weight:700>new</span> <span style=color:#000>Builder</span><span style=color:#000;font-weight:700>().</span><span style=color:#000>forBrowser</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>'firefox'</span><span style=color:#000;font-weight:700>).</span><span style=color:#000>build</span><span style=color:#000;font-weight:700>();</span>
<span style=color:#204a87;font-weight:700>try</span> <span style=color:#000;font-weight:700>{</span>
<span style=color:#8f5902;font-style:italic>// Navigate to Url
</span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>get</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>'https://www.google.com'</span><span style=color:#000;font-weight:700>);</span>
<span style=color:#8f5902;font-style:italic>// Enter text "cheese" and perform keyboard action "Enter"
</span><span style=color:#8f5902;font-style:italic></span> <span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>findElement</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>name</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>'q'</span><span style=color:#000;font-weight:700>)).</span><span style=color:#000>sendKeys</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>'cheese'</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>Key</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>ENTER</span><span style=color:#000;font-weight:700>);</span>
<span style=color:#204a87;font-weight:700>let</span> <span style=color:#000>firstResult</span> <span style=color:#ce5c00;font-weight:700>=</span> <span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>wait</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>until</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>elementLocated</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>css</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>'h3'</span><span style=color:#000;font-weight:700>)),</span> <span style=color:#0000cf;font-weight:700>10000</span><span style=color:#000;font-weight:700>);</span>
<span style=color:#000>console</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>log</span><span style=color:#000;font-weight:700>(</span><span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>firstResult</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>getAttribute</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>'textContent'</span><span style=color:#000;font-weight:700>));</span>
<span style=color:#000;font-weight:700>}</span>
<span style=color:#204a87;font-weight:700>finally</span><span style=color:#000;font-weight:700>{</span>
<span style=color:#204a87;font-weight:700>await</span> <span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>quit</span><span style=color:#000;font-weight:700>();</span>
<span style=color:#000;font-weight:700>}</span>
<span style=color:#000;font-weight:700>})();</span>
</code></pre></div></div><div class="tab-pane fade" id=tabs-1-5 role=tabpanel aria-labelled-by=tabs-1-5-tab><div class=highlight><pre style=background-color:#f8f8f8;-moz-tab-size:4;-o-tab-size:4;tab-size:4><code class=language-Kotlin data-lang=Kotlin><span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.By</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.Keys</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.firefox.FirefoxDriver</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.support.ui.ExpectedConditions.presenceOfElementLocated</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>org.openqa.selenium.support.ui.WebDriverWait</span>
<span style=color:#204a87;font-weight:700>import</span> <span style=color:#000>java.time.Duration</span>
<span style=color:#204a87;font-weight:700>fun</span> <span style=color:#000>main</span><span style=color:#000;font-weight:700>()</span> <span style=color:#000;font-weight:700>{</span>
<span style=color:#204a87;font-weight:700>val</span> <span style=color:#000>driver</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#000>FirefoxDriver</span><span style=color:#000;font-weight:700>()</span>
<span style=color:#204a87;font-weight:700>val</span> <span style=color:#000>wait</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#000>WebDriverWait</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>driver</span><span style=color:#000;font-weight:700>,</span> <span style=color:#000>Duration</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>ofSeconds</span><span style=color:#000;font-weight:700>(</span><span style=color:#0000cf;font-weight:700>10</span><span style=color:#000;font-weight:700>))</span>
<span style=color:#204a87;font-weight:700>try</span> <span style=color:#000;font-weight:700>{</span>
<span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#204a87;font-weight:700>get</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"https://google.com/ncr"</span><span style=color:#000;font-weight:700>)</span>
<span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>findElement</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>name</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"q"</span><span style=color:#000;font-weight:700>)).</span><span style=color:#000>sendKeys</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"cheese"</span> <span style=color:#000;font-weight:700>+</span> <span style=color:#000>Keys</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>ENTER</span><span style=color:#000;font-weight:700>)</span>
<span style=color:#204a87;font-weight:700>val</span> <span style=color:#000>firstResult</span> <span style=color:#000;font-weight:700>=</span> <span style=color:#000>wait</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>until</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>presenceOfElementLocated</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>By</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>cssSelector</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"h3"</span><span style=color:#000;font-weight:700>)))</span>
<span style=color:#000>println</span><span style=color:#000;font-weight:700>(</span><span style=color:#000>firstResult</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>getAttribute</span><span style=color:#000;font-weight:700>(</span><span style=color:#4e9a06>"textContent"</span><span style=color:#000;font-weight:700>))</span>
<span style=color:#000;font-weight:700>}</span> <span style=color:#204a87;font-weight:700>finally</span> <span style=color:#000;font-weight:700>{</span>
<span style=color:#000>driver</span><span style=color:#000;font-weight:700>.</span><span style=color:#000>quit</span><span style=color:#000;font-weight:700>()</span>
<span style=color:#000;font-weight:700>}</span>
<span style=color:#000;font-weight:700>}</span>
</code></pre></div></div></div><p>See the <a href=/documentation/overview/>Overview</a> to check the different project
components and decide if Selenium is the right tool for you.</p><p>You should continue on to <a href=/documentation/getting_started/>Getting Started</a>
to understand how you can install Selenium and successfully use it as a test
automation tool, and scaling simple tests like this to run in large, distributed
environments on multiple browsers, on several different operating systems.</p><div class=section-index><hr class=panel-line><div class=entry><h5><a href=/documentation/overview/>Overview</a></h5><p>Is Selenium for you? See an overview of the different project components.</p></div><div class=entry><h5><a href=/documentation/getting_started/>Getting Started</a></h5><p>If you are new to Selenium, we have a few resources that can help you get up to speed right away.</p></div><div class=entry><h5><a href=/documentation/webdriver/>WebDriver</a></h5><p>WebDriver drives a browser natively, learn more about it.</p></div><div class=entry><h5><a href=/documentation/guidelines/>Guidelines and recommendations</a></h5><p>Some guidelines and recommendations on testing from the Selenium project.</p></div><div class=entry><h5><a href=/documentation/worst_practices/>Worst practices</a></h5><p>Things to avoid when automating browsers with Selenium.</p></div><div class=entry><h5><a href=/documentation/grid/>Grid</a></h5><p>Want to run tests in parallel across multiple machines? Then, Grid is for you.</p></div><div class=entry><h5><a href=/documentation/support_packages/>Support Packages</a></h5><p>Set of packages and functionalities to simplify automation with Selenium.</p></div><div class=entry><h5><a href=/documentation/legacy/>Legacy</a></h5><p>Documentation related to the legacy components of Selenium. Meant to be kept purely for historical reasons and not as a incentive to use deprecated components.</p></div><div class=entry><h5><a href=/documentation/about/>About this documentation</a></h5><p></p></div></div><div class="text-muted mt-5 pt-3 border-top">Last modified October 26, 2021: <a href=https://github.com/SeleniumHQ/seleniumhq.github.io/commit/be027815554b605f3e6bfbc8eaaee7707bfd133c>Translated page /worst_practices/gmail_email_and_facebook_logins/ into German (#817) [deploy site] (be02781)</a></div></div></main></div></div><div class="row justify-content-center p-5"><h2 class="selenium text-center">Selenium Level Sponsors</h2></div><div class="row justify-content-around pt-4 pb-5 px-5"><div class="col-lg-3 col-md-6 mb-4 mb-lg-0 align-self-center px-5 py-3"><a href="http://www.browserstack.com/automate/?utm_campaign=open-source-sponsor&utm_source=seleniumorg&utm_medium=referral" class=border-0><img class="w-100 shadow-1-strong rounded selenium-backer-logo" src=/images/sponsors/browserstack.png alt=BrowserStack></a></div><div class="col-lg-3 col-md-6 mb-4 mb-lg-0 align-self-center px-5 py-3"><a href=http://saucelabs.com class=border-0><img class="w-100 shadow-1-strong rounded selenium-backer-logo" src=/images/sponsors/saucelabs.png alt="Sauce Labs"></a></div><div class="col-lg-3 col-md-6 mb-4 mb-lg-0 align-self-center px-5 py-3"><a href=http://bit.ly/36uZ7ad class=border-0><img class="w-100 shadow-1-strong rounded selenium-backer-logo" src=/images/sponsors/experitest.png alt=Experitest></a></div><div class="col-lg-3 col-md-6 mb-4 mb-lg-0 align-self-center px-5 py-3"><a href=https://applitools.com/ class=border-0><img class="w-100 shadow-1-strong rounded selenium-backer-logo" src=/images/sponsors/applitools.png alt=Applitools></a></div><div class="col-lg-3 col-md-6 mb-4 mb-lg-0 align-self-center px-5 py-3"><a href=https://www.perfecto.io/ class=border-0><img class="w-100 shadow-1-strong rounded selenium-backer-logo" src=/images/sponsors/perfecto-perforce.jpg alt=Perfecto></a></div><div class="col-lg-3 col-md-6 mb-4 mb-lg-0 align-self-center px-5 py-3"><a href=https://www.lambdatest.com/selenium-automation class=border-0><img class="w-100 shadow-1-strong rounded selenium-backer-logo" src=/images/sponsors/lambda-test.png alt=LambdaTest></a></div><div class="col-lg-3 col-md-6 mb-4 mb-lg-0 align-self-center px-5 py-3"><a href="https://www.subject-7.com/?utm_source=SeleniumHQ&utm_medium=referral&utm_campaign=product" class=border-0><img class="w-100 shadow-1-strong rounded selenium-backer-logo" src=/images/sponsors/subject7_logo.png alt=Subject7></a></div></div><div class="row justify-content-center pt-2 pb-3 -bg-selenium-cyan"><div class="card text-center border-0 bg-transparent py-5"><div class=card-body><h2 class=card-title>Support the Selenium Project</h2><p class=card-text></p><div class=selenium-button-container><a href=/sponsors class="selenium-button selenium-white-cyan text-uppercase font-weight-bold">Learn more
<i class="pl-3 fas fa-caret-right"></i></a></div></div></div></div><footer class="bg-dark py-5 row d-print-none"><div class="container-fluid mx-sm-5"><div class=row><div class="col-6 col-sm-4 text-xs-center order-sm-2"><ul class="list-inline mb-0"><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="User mailing list" aria-label="User mailing list"><a class=text-white target=_blank rel=noopener href=https://groups.google.com/group/selenium-users aria-label="User mailing list"><i class="fas fa-mail-bulk"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Selenium in Twitter" aria-label="Selenium in Twitter"><a class=text-white target=_blank rel=noopener href=https://twitter.com/SeleniumHQ aria-label="Selenium in Twitter"><i class="fab fa-twitter"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="SeleniumConf YouTube Channel" aria-label="SeleniumConf YouTube Channel"><a class=text-white target=_blank rel=noopener href=https://www.youtube.com/channel/UCbDlgX_613xNMrDqCe3QNEw aria-label="SeleniumConf YouTube Channel"><i class="fab fa-youtube"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Selenium in Facebook" aria-label="Selenium in Facebook"><a class=text-white target=_blank rel=noopener href=https://www.facebook.com/Selenium2.WebDriver aria-label="Selenium in Facebook"><i class="fab fa-facebook"></i></a></li></ul></div><div class="col-6 col-sm-4 text-right text-xs-center order-sm-3"><ul class="list-inline mb-0"><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Software Freedom Conservancy" aria-label="Software Freedom Conservancy"><a class=text-white target=_blank rel=noopener href=mailto:[email protected] aria-label="Software Freedom Conservancy"><i class="fas fa-envelope-square"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title=GitHub aria-label=GitHub><a class=text-white target=_blank rel=noopener href=https://github.com/seleniumhq/selenium aria-label=GitHub><i class="fab fa-github"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title=Slack aria-label=Slack><a class=text-white target=_blank rel=noopener href=https://join.slack.com/t/seleniumhq/shared_invite/zt-vv33sc0w-VKKQop3WDV_lfrLXGGHvDw aria-label=Slack><i class="fab fa-slack"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title=IRC aria-label=IRC><a class=text-white target=_blank rel=noopener href=https://kiwiirc.com/nextclient/irc.libera.chat/#selenium aria-label=IRC><i class="fas fa-comments"></i></a></li><li class="list-inline-item mx-2 h3" data-toggle=tooltip data-placement=top title="Developer mailing list" aria-label="Developer mailing list"><a class=text-white target=_blank rel=noopener href=https://groups.google.com/g/selenium-developers aria-label="Developer mailing list"><i class="fa fa-envelope"></i></a></li></ul></div><div class="col-12 col-sm-4 text-center py-2 order-sm-2"><small class=text-white>© 2021 Software Freedom Conservancy All Rights Reserved</small><p class=mt-2><a href=/about/>About Selenium</a></p></div></div></div></footer></div><script src=https://cdn.jsdelivr.net/npm/[email protected]/dist/umd/popper.min.js integrity=sha384-9/reFTGAW83EW2RDu2S0VKaIzap3H66lZH81PoYlFhbGU+6BZp6G7niu735Sk7lN crossorigin=anonymous></script><script src=https://cdn.jsdelivr.net/npm/[email protected]/dist/js/bootstrap.min.js integrity=sha384-+YQ4JLhjyBLPDQt//I+STsc9iw4uQqACwlvpslubQzn4u2UU2UFM80nGisd026JF crossorigin=anonymous></script><script src=/js/tabpane-persist.js></script><script src=/js/main.min.5c74b870c6953931a705f390a49c7e4c0a842ec5c83b24354758dd674343ed0d.js integrity="sha256-XHS4cMaVOTGnBfOQpJx+TAqELsXIOyQ1R1jdZ0ND7Q0=" crossorigin=anonymous></script><script src=/js/prism.js></script><script type=text/javascript src=https://cdn.jsdelivr.net/npm/docsearch.js@2/dist/cdn/docsearch.min.js></script><script type=text/javascript>docsearch({apiKey:'f6cea044c21fee6ae07b0b090bf2ca6a',indexName:'selenium',inputSelector:'.td-search-input',debug:!1})</script></body></html>