|
1 | 1 | ---
|
2 |
| -title: "Open and close a browser with Selenium" |
| 2 | +title: "Abra e feche um navegador de internet com o Selenium" |
3 | 3 | linkTitle: "Open Browser"
|
4 | 4 | weight: 6
|
5 |
| -needsTranslation: true |
| 5 | +needsTranslation: false |
6 | 6 | description: >
|
7 |
| - Code examples for starting and stopping a session with each browser. |
| 7 | + Exemplos de código para iniciar e parar uma sessão em cada navegador de internet. |
8 | 8 | ---
|
| 9 | +Assim que você tiver a [biblioteca Selenium instalada]({{< ref "install_library.md" >}}), |
| 10 | +e o [driver do seu navegador de internet preferido]({{< ref "install_drivers.md" >}}), você pode iniciar e parar uma sessão com o navegador de internet. |
9 | 11 |
|
10 |
| -Once you have a [Selenium library installed]({{< ref "install_library.md" >}}), |
11 |
| -and your [desired browser driver]({{< ref "install_drivers.md" >}}), |
12 |
| -you can start and stop a session with a browser. |
| 12 | +Normalmente, os navegadores são iniciados com opções específicas que descrevem quais recursos o navegador deve suportar e como o navegador deve se comportar durante a sessão. Alguns recursos são [compartilhados por todos os navegadores de internet]({{< ref "/documentation/webdriver/capabilities/shared.md" >}}), já |
| 13 | +outros serão exclusivos para o navegador de internet que está sendo usado. |
| 14 | +Esta página mostrará exemplos de como iniciar um navegador de internet com os recursos padrões. |
13 | 15 |
|
14 |
| -Typically, browsers are started with specific options that describe |
15 |
| -which capabilities the browser must support, and how the browser should |
16 |
| -behave during the session. Some capabilities are |
17 |
| -[shared by all browsers]({{< ref "/documentation/webdriver/capabilities/shared.md" >}}), and |
18 |
| -some will be specific to the browser being used. |
19 |
| -This page will show examples of starting a browser with the default capabilities. |
20 |
| - |
21 |
| -After learning how to start a session, check out the next session on how to |
22 |
| -[write your first Selenium script]({{< ref "first_script.md" >}}) |
| 16 | +Depois de você aprender como iniciar uma sessão, confira a próxima sessão sobre como [programar o seu primeiro script Selenium script]({{< ref "first_script.md" >}}) |
23 | 17 |
|
24 | 18 | ## Chrome
|
25 | 19 |
|
26 |
| -By default, Selenium 4 is compatible with Chrome v75 and greater. Note that the version of |
27 |
| -the Chrome browser and the version of chromedriver must match the major version. |
| 20 | +Por padrão, o Selenium 4 é compativel com o Chrome v75 e versões superiores. Observe que a versão do |
| 21 | +navegador de internet Chrome e a versão do chromedriver precisam corresponder à versão principal. |
28 | 22 |
|
29 |
| -In addition to the [shared capabilities]({{< ref "/documentation/webdriver/capabilities/shared.md" >}}), |
30 |
| -there are specific [Chrome capabilities]({{< ref "/documentation/webdriver/capabilities/chromium.md" >}}) |
31 |
| -that can be used. |
| 23 | +Além dos [recursos compartilhados]({{< ref "/documentation/webdriver/capabilities/shared.md" >}}), |
| 24 | +existem [recursos Chrome]({{< ref "/documentation/webdriver/capabilities/chromium.md" >}}) exclusivos |
| 25 | +que podem ser utilizados. |
32 | 26 |
|
33 | 27 | {{< tabpane langEqualsHeader=true >}}
|
34 | 28 | {{< tab header="Java" github="SeleniumHQ/seleniumhq.github.io/blob/dev/examples/java/src/test/java/dev/selenium/getting_started/OpenBrowserTest.java#L27-L30" >}}
|
@@ -68,8 +62,8 @@ that can be used.
|
68 | 62 |
|
69 | 63 | ## Edge
|
70 | 64 |
|
71 |
| -Microsoft Edge is implemented with Chromium, with the earliest supported version of v79. Similar to Chrome, |
72 |
| -the major version number of edgedriver must match the major version of the Edge browser. |
| 65 | +O Microsoft Edge é implementado com o Chromium, com a versão mais antiga com suporte da v79. Semelhante ao Chrome, |
| 66 | +o número da versão principal do edgedriver deve corresponder à versão principal do navegador Edge |
73 | 67 |
|
74 | 68 | {{< tabpane langEqualsHeader=true >}}
|
75 | 69 | {{< tab header="Java" github="SeleniumHQ/seleniumhq.github.io/blob/dev/examples/java/src/test/java/dev/selenium/getting_started/OpenBrowserTest.java#L35-L38">}}
|
@@ -109,7 +103,7 @@ the major version number of edgedriver must match the major version of the Edge
|
109 | 103 |
|
110 | 104 | ## Firefox
|
111 | 105 |
|
112 |
| -Selenium 4 requires Firefox 78 or greater. It is recommended to always use the latest version of geckodriver. |
| 106 | +O Selenium 4 requer o Firefox 78 ou superior. Recomenda-se sempre usar a versão mais recente do geckodriver. |
113 | 107 |
|
114 | 108 | {{< tabpane langEqualsHeader=true >}}
|
115 | 109 | {{< tab header="Java" github="SeleniumHQ/seleniumhq.github.io/blob/dev/examples/java/src/test/java/dev/selenium/getting_started/OpenBrowserTest.java#L43-L46">}}
|
@@ -149,23 +143,21 @@ Selenium 4 requires Firefox 78 or greater. It is recommended to always use the l
|
149 | 143 |
|
150 | 144 | ## Internet Explorer
|
151 | 145 |
|
152 |
| -The IE Driver is the only driver maintained by the Selenium Project directly. |
153 |
| -While binaries for both the 32-bit and 64-bit |
154 |
| -versions of Internet Explorer are available, there are some |
155 |
| -[limitations](//jimevansmusic.blogspot.co.uk/2014/09/screenshots-sendkeys-and-sixty-four.html) |
156 |
| -with the 64-bit driver. As such it is recommended to use the 32-bit driver. |
| 146 | +O Driver IE é o único driver mantido diretamente pelo Projeto Selenium. |
| 147 | +Apesar dos binários para ambas as versões de 32 bits e 64 bits do Internet Explorer estarem disponiveis, existem algumas |
| 148 | +[limitações](//jimevansmusic.blogspot.co.uk/2014/09/screenshots-sendkeys-and-sixty-four.html) com o driver de 64 bits. Portanto, é recomendável usar o driver de 32 bits. |
157 | 149 |
|
158 |
| -### Legacy |
159 |
| -The Selenium project aims to support the same releases that |
160 |
| -[Microsoft considers current](//support.microsoft.com/en-gb/help/17454/lifecycle-support-policy-faq-internet-explorer). |
161 |
| -Older releases may work, but will not be supported. Note that Internet Explorer 11 will end support for certain |
162 |
| -operating systems, including Windows 10 on June 15, 2022. |
| 150 | +### Legado |
| 151 | +O projeto Selenium tem como objetivo suportar os mesmos lançamentos que a |
| 152 | +[Microsoft considera como atual](//support.microsoft.com/en-gb/help/17454/lifecycle-support-policy-faq-internet-explorer). |
| 153 | +Versões mais antigas podem até funcionar, mas não serão suportadas. Observe que o Internet Explorer 11 encerrará o suporte para determinados |
| 154 | +sistemas operacionais, incluindo o Windows 10 em 15 de junho de 2022. |
163 | 155 |
|
164 |
| -It should be noted that as Internet Explorer |
165 |
| -preferences are saved against the logged-in user's account, some additional setup is required. |
| 156 | +Deve-se notar que, devido a no Internet Explorer |
| 157 | +preferências serem salvas na conta do usuário conectado, algumas configurações adicionais são necessárias. |
166 | 158 |
|
167 |
| -Additional information about using Internet Explorer can be found |
168 |
| -[on the Selenium wiki](//github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver) |
| 159 | +Informações adicionais sobre como usar o Internet Explorer podem ser encontradas |
| 160 | +na [wiki do Selenium](//github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver) |
169 | 161 |
|
170 | 162 | {{< tabpane langEqualsHeader=true >}}
|
171 | 163 | {{< tab header="Java" github="SeleniumHQ/seleniumhq.github.io/blob/dev/examples/java/src/test/java/dev/selenium/getting_started/OpenBrowserTest.java#L52-L55">}}
|
@@ -212,8 +204,8 @@ Additional information about using Internet Explorer can be found
|
212 | 204 | {{< /tab >}}
|
213 | 205 | {{< /tabpane >}}
|
214 | 206 |
|
215 |
| -### Compatibility Mode |
216 |
| -Microsoft Edge can be used in IE compatibility mode using the IE Driver. |
| 207 | +### Modo de compatibilidade |
| 208 | +O Microsoft Edge pode ser usado no modo de compatibilidade do IE usando o Driver do IE. |
217 | 209 |
|
218 | 210 | {{< tabpane langEqualsHeader=true >}}
|
219 | 211 | {{< tab header="Java" github="SeleniumHQ/seleniumhq.github.io/blob/dev/examples/java/src/test/java/dev/selenium/getting_started/OpenBrowserTest.java#L61-L67">}}
|
@@ -275,9 +267,9 @@ Microsoft Edge can be used in IE compatibility mode using the IE Driver.
|
275 | 267 |
|
276 | 268 | ## Opera
|
277 | 269 |
|
278 |
| -Since the opera driver does not support w3c syntax, but is based on Chromium, it is recommended |
279 |
| -to drive Opera browser with the chromedriver. Like all Chromium implementations, |
280 |
| -make sure that the browser version matches the driver version. |
| 270 | +Como o driver opera não suporta a sintaxe w3c, mas é baseado no Chromium, é recomendado |
| 271 | +utilizar o navegador Opera com o chromedriver. Assim como todas as implementações do Chromium, |
| 272 | +certifique-se de que a versão do navegador corresponda à versão do driver. |
281 | 273 |
|
282 | 274 | {{< tabpane langEqualsHeader=true >}}
|
283 | 275 | {{< tab header="Java" github="SeleniumHQ/seleniumhq.github.io/blob/dev/examples/java/src/test/java/dev/selenium/getting_started/OpenBrowserTest.java#L73-L78">}}
|
@@ -337,8 +329,8 @@ make sure that the browser version matches the driver version.
|
337 | 329 | ## Safari
|
338 | 330 |
|
339 | 331 | ### Desktop
|
340 |
| -Unlike Chromium and Firefox drivers, the safaridriver is installed with the Operating System. |
341 |
| -To enable automation on Safari, run the following command from the terminal: |
| 332 | +Ao contrário dos drivers Chromium e Firefox, o safaridriver é instalado com o sistema operacional. |
| 333 | +Para habilitar a automação no Safari, execute o seguinte comando no terminal: |
342 | 334 |
|
343 | 335 | ```shell
|
344 | 336 | safaridriver --enable
|
@@ -389,7 +381,7 @@ safaridriver --enable
|
389 | 381 | {{< /tabpane >}}
|
390 | 382 |
|
391 | 383 | ### Mobile
|
392 |
| -Those looking to automate Safari on iOS should look to the [Appium project](//appium.io/). |
| 384 | +Aqueles interessados em automatizar o Safari no iOS devem procurar o [projeto Appium](//appium.io/). |
393 | 385 |
|
394 |
| -## Next Step |
395 |
| -[Create your first Selenium script]({{< ref "first_script.md" >}}) |
| 386 | +## Próximo Passo |
| 387 | +[Programando o seu primeiro script Selenium]({{< ref "first_script.md" >}}) |
0 commit comments