Skip to content

Finished translating bidi_api.pt-br.md to Brazilian Portuguese #1053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,27 +1,15 @@
---
title: "BiDirectional API"
title: "API BiDirecional"
linkTitle: "BiDi API"
weight: 12
---

{{% pageinfo color="warning" %}}
<p class="lead">
<i class="fas fa-language display-4"></i>
Page being translated from
English to Portuguese. Do you speak Portuguese? Help us to translate
it by sending us pull requests!
</p>
{{% /pageinfo %}}
A seguinte lista de APIs crescerá à medida que o projeto Selenium se prepara
para suportar casos de uso do mundo real. Se houver funcionalidades adicionais que você gostaria de ver, por favor, levante uma [solicitação de recurso](https://github.com/SeleniumHQ/selenium/issues/new?assignees=&labels=&template=feature.md).

The following list of APIs will be growing as the Selenium
project works through supporting real world use cases. If there
is additional functionality you'd like to see, please raise a
[feature request](https://github.com/SeleniumHQ/selenium/issues/new?assignees=&labels=&template=feature.md).
## Registrar autenticação básica

## Register Basic Auth

Some applications make use of browser authentication to secure pages.
With Selenium, you can automate the input of basic auth credentials whenever they arise.
Alguns aplicativos fazem o uso da autenticação do navegador para proteger suas páginas. Com o Selenium, você pode automatizar a entrada de credenciais básicas de autenticação sempre que for necessário.

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" >}}
Expand All @@ -31,7 +19,7 @@ Predicate<URI> uriPredicate = uri -> uri.getHost().contains("your-domain.com");
driver.get("https://your-domain.com/login");
{{< /tab >}}
{{< tab header="Python" >}}
# Please raise a PR to add code sample
# Por favor, crie um PR para adicionar a amostra de código
{{< /tab >}}
{{< tab header="CSharp" >}}
NetworkAuthenticationHandler handler = new NetworkAuthenticationHandler()
Expand Down Expand Up @@ -86,9 +74,7 @@ driver.get("https://your-domain.com/login")

## Mutation Observation

Mutation Observation is the ability to capture events via
WebDriver BiDi when there are DOM mutations on a specific
element in the DOM.
Mutation Observation(Observação de Mutação) é a capacidade de capturar eventos via WebDriver BiDi quando há mutações DOM em um elemento específico no DOM.

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" >}}
Expand Down Expand Up @@ -202,13 +188,12 @@ const assert = require("assert");
}())
{{< /tab >}}
{{< tab header="Kotlin" >}}
# Please raise a PR to add code sample
# Por favor, crie um PR para adicionar a amostra de código
{{< /tab >}}
{{< /tabpane >}}

## Listen to `console.log` events

Listen to the `console.log` events and register callbacks to process the event.
## Vigie eventos `console.log`
Vigie os eventos `console.log` e registre os callbacks(retornos de chamada) para processar o evento.

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" >}}
Expand All @@ -222,7 +207,7 @@ devTools.addListener(Log.entryAdded(),
System.out.println("level: "+logEntry.getLevel());
});
driver.get("http://the-internet.herokuapp.com/broken_images");
// Check the terminal output for the browser console messages.
// Para ver as mensagens do console no navegador verifique a saída do terminal.
driver.quit();
{{< /tab >}}
{{< tab header="Python" >}}
Expand Down Expand Up @@ -308,10 +293,10 @@ fun kotlinConsoleLogExample() {
{{< /tab >}}
{{< /tabpane >}}

## Listen to JS Exceptions
## Vigie exceções JS

Listen to the JS Exceptions
and register callbacks to process the exception details.
Vigie as exceções JS
e registre callbacks(retornos de chamada) para processar os detalhes da exceção.

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" >}}
Expand Down Expand Up @@ -351,7 +336,7 @@ async def catchJSException():
driver.get("<your site url>")
log = Log(driver, session)
async with log.add_js_error_listener() as messages:
# Operation on the website that throws an JS error
# Ação no site que gera um erro JS
print(messages)

driver.quit()
Expand Down Expand Up @@ -390,7 +375,7 @@ begin
puts exceptions.length
end

# Actions causing JS exceptions
# Ações que causam exceções JS

ensure
driver.quit
Expand Down Expand Up @@ -441,10 +426,10 @@ fun kotlinJsErrorListener() {
{{< /tab >}}
{{< /tabpane >}}

## Network Interception
## Interceptação de Rede

If you want to capture network events coming into the browser and you want manipulate them you are able to do
it with the following examples.
Se você quer capturar eventos de rede que chegam ao navegador e deseja manipulá-los, você pode fazer
com os exemplos a seguir.

{{< tabpane langEqualsHeader=true >}}
{{< tab header="Java" >}}
Expand All @@ -471,10 +456,10 @@ it with the following examples.
assertThat(source).contains("delicious cheese!");
{{< /tab >}}
{{< tab header="Python" >}}
# Currently unavailable in python due the inability to mix certain async and sync commands
# Atualmente indisponível no python devido à incapacidade de misturar certos comandos async(assíncronos) e de sync(sincronização)
{{< /tab >}}
{{< tab header="CSharp" >}}
# Please raise a PR to add code sample
# Por favor, crie um PR para adicionar a amostra de código
{{< /tab >}}
{{< tab header="Ruby" >}}
require 'selenium-webdriver'
Expand Down