diff --git a/website_and_docs/content/documentation/grid/advanced_features/_index.pt-br.md b/website_and_docs/content/documentation/grid/advanced_features/_index.pt-br.md index ae4c1b30844..e9a4d28b76b 100644 --- a/website_and_docs/content/documentation/grid/advanced_features/_index.pt-br.md +++ b/website_and_docs/content/documentation/grid/advanced_features/_index.pt-br.md @@ -1,18 +1,9 @@ --- -title: "Advanced Features" -linkTitle: "Advanced Features" +title: "Características avançadas" +linkTitle: "Características avançadas" weight: 12 description: > - To get all the details of the advanced features, understand how it works, and how to set - up your own, please browse thorough the following sections. + Para obter todos os detalhes dos recursos avançados, entenda como funciona e como configurar + crie o seu próprio, navegue pelas seções a seguir. aliases: ["/documentation/pt-br/grid/grid_4/advanced_features/"] --- - -{{% pageinfo color="warning" %}} -

- - Page being translated from - English to Portuguese. Do you speak Portuguese? Help us to translate - it by sending us pull requests! -

-{{% /pageinfo %}} diff --git a/website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md b/website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md index 21b4e4a4fad..f2a4a605824 100644 --- a/website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md +++ b/website_and_docs/content/documentation/grid/advanced_features/customize_node.pt-br.md @@ -1,70 +1,60 @@ --- -title: "Customizing a Node" -linkTitle: "Customize Node" +title: "Personalizando um Nó" +linkTitle: "Personalizando um Nó" weight: 4 --- +## Como personalizar um Nó -{{% pageinfo color="warning" %}} -

- - Page being translated from - English to Portugese. Do you speak Portugese? Help us to translate - it by sending us pull requests! -

-{{% /pageinfo %}} +Há momentos em que gostaríamos de personalizar um Nó de acordo com nossas necessidades. -## How to customize a Node +Por exemplo, podemos desejar fazer alguma configuração adicional antes que uma sessão comece a ser executada e executar alguma limpeza após o término de uma sessão. -There are times when we would like a Node to be customized to our needs. +Os seguintes passos podem ser seguidos para isso: -For e.g., we may like to do some additional setup before a session begins execution and some clean-up after a session runs to completion. - -Following steps can be followed for this: - -* Create a class that extends `org.openqa.selenium.grid.node.Node` -* Add a static method (this will be our factory method) to the newly created class whose signature looks like this: +- Crie uma classe que estenda `org.openqa.selenium.grid.node.Node`. +- Adicione um método estático (este será nosso método de fábrica) à classe recém-criada, cuja assinatura se parece com esta: `public static Node create(Config config)`. Here: - * `Node` is of type `org.openqa.selenium.grid.node.Node` - * `Config` is of type `org.openqa.selenium.grid.config.Config` -* Within this factory method, include logic for creating your new Class. -* To wire in this new customized logic into the hub, start the node and pass in the fully qualified class name of the above class to the argument `--node-implementation` + * `Node` é do tipo `org.openqa.selenium.grid.node.Node` + * `Config` é do tipo `org.openqa.selenium.grid.config.Config` +* Dentro deste método de fábrica, inclua a lógica para criar sua nova classe.. +* TPara incorporar esta nova lógica personalizada no hub, inicie o nó e passe o nome da classe totalmente qualificado da classe acima como argumento. `--node-implementation` -Let's see an example of all this: +Vamos ver um exemplo de tudo isso: -### Custom Node as an uber jar +### Node personalizado como um uber jar -1. Create a sample project using your favourite build tool (**Maven**|**Gradle**). -2. Add the below dependency to your sample project. +1. Crie um projeto de exemplo usando sua ferramenta de construção favorita. (**Maven**|**Gradle**). +2. Adicione a seguinte dependência ao seu projeto de exemplo.. * [org.seleniumhq.selenium/selenium-grid](https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-grid) -3. Add your customized Node to the project. -4. Build an [uber jar](https://imagej.net/develop/uber-jars) to be able to start the Node using `java -jar` command. -5. Now start the Node using the command: +3. Adicione o seu nó personalizado ao projeto. +4. Construir algo. [uber jar](https://imagej.net/develop/uber-jars) Para ser capaz de iniciar o Node usando o comando `java -jar`. +5. Agora inicie o nó usando o comando: ```bash java -jar custom_node-server.jar node \ --node-implementation org.seleniumhq.samples.DecoratedLoggingNode ``` +**Observação:** Se estiver usando o Maven como ferramenta de construção, é preferível usar o [maven-shade-plugin](https://maven.apache.org/plugins/maven-shade-plugin) em vez do [maven-assembly-plugin](https://maven.apache.org/plugins/maven-assembly-plugin) porque o plugin maven-assembly parece ter problemas para mesclar vários arquivos de Service Provider Interface (`META-INF/services`). -**Note:** If you are using Maven as a build tool, please prefer using [maven-shade-plugin](https://maven.apache.org/plugins/maven-shade-plugin) instead of [maven-assembly-plugin](https://maven.apache.org/plugins/maven-assembly-plugin) because maven-assembly plugin seems to have issues with being able to merge multiple Service Provider Interface files (`META-INF/services`) -### Custom Node as a regular jar +### Node personalizado como jar + +1. Crie um projeto de exemplo usando a sua ferramenta de construção favorita (**Maven**|**Gradle**). +2. Adicione a seguinte dependência ao seu projeto de exemplo: + * [org.seleniumhq.selenium/selenium-grid](https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-grid) +3. Adicione o seu Node personalizado ao projeto. +4. Construa um arquivo JAR do seu projeto usando a sua ferramenta de construção. +5. Agora, inicie o Node usando o seguinte comando: -1. Create a sample project using your favourite build tool (**Maven**|**Gradle**). -2. Add the below dependency to your sample project. - * [org.seleniumhq.selenium/selenium-grid](https://mvnrepository.com/artifact/org.seleniumhq.selenium/selenium-grid) -3. Add your customized Node to the project. -4. Build a jar of your project using your build tool. -5. Now start the Node using the command: ```bash java -jar selenium-server-4.6.0.jar \ --ext custom_node-1.0-SNAPSHOT.jar node \ --node-implementation org.seleniumhq.samples.DecoratedLoggingNode ``` -Below is a sample that just prints some messages on to the console whenever there's an activity of interest (session created, session deleted, a webdriver command executed etc.,) on the Node. - +Aqui está um exemplo que apenas imprime algumas mensagens no console sempre que houver uma atividade de interesse (sessão criada, sessão excluída, execução de um comando do webdriver, etc.) no Node.
Sample customized node @@ -234,21 +224,21 @@ public class DecoratedLoggingNode extends Node { ```
-**_Foot Notes:_** +**_Notas de Rodapé:_** -In the above example, the line `Node node = LocalNodeFactory.create(config);` explicitly creates a `LocalNode`. +No exemplo acima, a linha `Node node = LocalNodeFactory.create(config);` cria explicitamente um `LocalNode`. -There are basically 2 types of *user facing implementations* of `org.openqa.selenium.grid.node.Node` available. +Basicamente, existem 2 tipos de implementações *visíveis para o usuário* de `org.openqa.selenium.grid.node.Node` disponíveis. -These classes are good starting points to learn how to build a custom Node and also to learn the internals of a Node. +Essas classes são bons pontos de partida para aprender como criar um Node personalizado e também para compreender os detalhes internos de um Node. -* `org.openqa.selenium.grid.node.local.LocalNode` - Used to represent a long running Node and is the default implementation that gets wired in when you start a `node`. - * It can be created by calling `LocalNodeFactory.create(config);`, where: - * `LocalNodeFactory` belongs to `org.openqa.selenium.grid.node.local` - * `Config` belongs to `org.openqa.selenium.grid.config` -* `org.openqa.selenium.grid.node.k8s.OneShotNode` - This is a special reference implementation wherein the Node gracefully shuts itself down after servicing one test session. This class is currently not available as part of any pre-built maven artifact. - * You can refer to the source code [here](https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/grid/node/k8s/OneShotNode.java) to understand its internals. - * To build it locally refer [here](https://github.com/SeleniumHQ/selenium/blob/trunk/deploys/k8s/README.md). - * It can be created by calling `OneShotNode.create(config)`, where: - * `OneShotNode` belongs to `org.openqa.selenium.grid.node.k8s` - * `Config` belongs to `org.openqa.selenium.grid.config` +* `org.openqa.selenium.grid.node.local.LocalNode` - Usado para representar um Node de execução contínua e é a implementação padrão que é usada quando você inicia um `node`. + * Pode ser criado chamando `LocalNodeFactory.create(config);`, onde: + * `LocalNodeFactory` pertence a `org.openqa.selenium.grid.node.local` + * `Config` pertence a `org.openqa.selenium.grid.config` +* `org.openqa.selenium.grid.node.k8s.OneShotNode` - Esta é uma implementação de referência especial em que o Node encerra-se graciosamente após atender a uma sessão de teste. Esta classe atualmente não está disponível como parte de nenhum artefato Maven pré-construído. + * Você pode consultar o código-fonte [aqui](https://github.com/SeleniumHQ/selenium/blob/trunk/java/src/org/openqa/selenium/grid/node/k8s/OneShotNode.java) para entender seus detalhes internos. + * Para construí-lo localmente, consulte [aqui](https://github.com/SeleniumHQ/selenium/blob/trunk/deploys/k8s/README.md). + * Pode ser criado chamando `OneShotNode.create(config)`, onde: + * `OneShotNode` pertence a `org.openqa.selenium.grid.node.k8s` + * `Config` pertence a `org.openqa.selenium.grid.config` diff --git a/website_and_docs/content/documentation/grid/advanced_features/observability.pt-br.md b/website_and_docs/content/documentation/grid/advanced_features/observability.pt-br.md index e6115f75243..852e33ae390 100644 --- a/website_and_docs/content/documentation/grid/advanced_features/observability.pt-br.md +++ b/website_and_docs/content/documentation/grid/advanced_features/observability.pt-br.md @@ -1,116 +1,118 @@ --- -title: "Observability" -linkTitle: "Observability" +title: "Observabilidade" +linkTitle: "Observabilidade" weight: 1 aliases: ["/documentation/pt-br/grid/grid_4/advanced_features/observability/"] --- -{{% pageinfo color="warning" %}} -

- - Page being translated from - English to Portuguese. Do you speak Portuguese? Help us to translate - it by sending us pull requests! -

-{{% /pageinfo %}} - - -## Table of Contents +## Índice - [Selenium Grid](#selenium-grid) - - [Observability](#observability) - - [Distributed tracing](#distributed-tracing) - - [Event logging](#event-logging) - - [Grid Observability](#grid-observability) - - [Visualizing Traces](#visualizing-traces) - - [Leveraging event logs](#leveraging-event-logs) - - [References](#references) + - [Observabilidade](#observabilidade) + - [Rastreamento distribuído](#rastreamento-distribuído) + - [Registro de eventos](#Registro-de-eventos) + - [Observabilidade da Grade](#observabilidade-da-grade) + - [Visualizando Traços](#visualizando-traços) + - [Aproveitando logs de eventos](#Aproveitando-logs-de-eventos) + - [Referências](#referências) ## Selenium Grid -Grid aids in scaling and distributing tests by executing tests on various browser and operating system combinations. +O Grid auxilia na escalabilidade e distribuição de testes, executando testes em várias combinações de navegadores e sistemas operacionais. + +## Observabilidade + +A observabilidade tem três pilares: rastreamentos, métricas e registros. Como o Selenium Grid 4 foi projetado para ser totalmente distribuído, a observabilidade tornará mais fácil entender e depurar os detalhes internos. + +## Rastreamento Distribuído +Uma única solicitação ou transação abrange vários serviços e componentes. O rastreamento acompanha o ciclo de vida da solicitação à medida que cada serviço a executa. Isso é útil para depurar cenários de erro. +Alguns termos-chave usados no contexto de rastreamento são: + -## Observability +**Rastreamento** +O rastreamento permite rastrear uma solicitação por meio de vários serviços, desde sua origem até seu destino final. A jornada dessa solicitação ajuda na depuração, no monitoramento do fluxo de ponta a ponta e na identificação de falhas. Um rastreamento representa o fluxo da solicitação de ponta a ponta. Cada rastreamento possui um identificador único. -Observability has three pillars: traces, metrics and logs. Since Selenium Grid 4 is designed to be fully distributed, observability will make it easier to understand and debug the internals. -## Distributed tracing -A single request or transaction spans multiple services and components. Tracing tracks the request lifecycle as each service executes the request. It is useful in debugging in an error scenario. -Some key terms used in tracing context are: +**Segmento** +Cada rastreamento é composto por operações cronometradas chamadas segmentos. Um segmento possui um horário de início e término e representa operações realizadas por um serviço. A granularidade do segmento depende de como ele é instrumentado. Cada segmento possui um identificador único. Todos os segmentos dentro de um rastreamento têm o mesmo ID de rastreamento. -**Trace** -Tracing allows one to trace a request through multiple services, starting from its origin to its final destination. This request's journey helps in debugging, monitoring the end-to-end flow, and identifying failures. A trace depicts the end-to-end request flow. Each trace has a unique id as its identifier. -**Span** -Each trace is made up of timed operations called spans. A span has a start and end time and it represents operations done by a service. The granularity of span depends on how it is instrumented. Each span has a unique identifier. All spans within a trace have the same trace id. +**Atributos de Segmento** +Atributos de segmento são pares de chave e valor que fornecem informações adicionais sobre cada segmento. -**Span Attributes** -Span attributes are key-value pairs which provide additional information about each span. +**Eventos** +Eventos são registros com carimbo de data/hora dentro de um segmento. Eles fornecem contexto adicional para os segmentos existentes. Os eventos também contêm pares de chave e valor como atributos de evento. -**Events** -Events are timed-stamped logs within a span. They provide additional context to the existing spans. Events also contain key-value pairs as event attributes. +## Registro de Eventos -## Event logging +O registro é essencial para depurar um aplicativo. O registro é frequentemente feito em um formato legível por humanos. Mas, para que as máquinas possam pesquisar e analisar os registros, é necessário ter um formato bem definido. O registro estruturado é uma prática comum de registrar logs de forma consistente em um formato fixo. Ele normalmente contém campos como: -Logging is essential to debug an application. Logging is often done in a human-readable format. But for machines to search and analyze the logs, it has to have a well-defined format. Structured logging is a common practice of recording logs consistently in a fixed format. It commonly contains fields like: - * Timestamp - * Logging level - * Logger class - * Log message (This is further broken down into fields relevant to the operation where the log was recorded) + * Carimbo de data/horas + * Nível de registro + * Classe de registro + * Mensagem de registro (isso é detalhado em campos relevantes à operação em que o registro foi feito) + +Registros e eventos estão intimamente relacionados. Os eventos encapsulam todas as informações possíveis para realizar uma única unidade de trabalho. Os registros são essencialmente subconjuntos de um evento. No cerne, ambos auxiliam na depuração. + +Consulte os recursos a seguir para entender em detalhes: -Logs and events are closely related. Events encapsulate all the possible information available to do a single unit of work. Logs are essentially subsets of an event. At the crux, both aid in debugging. -Refer following resources for detailed understanding: 1. [https://www.honeycomb.io/blog/how-are-structured-logs-different-from-events/](https://www.honeycomb.io/blog/how-are-structured-logs-different-from-events/) 2. [https://charity.wtf/2019/02/05/logs-vs-structured-events/](https://charity.wtf/2019/02/05/logs-vs-structured-events/) -## Grid Observability +## Observabilidade do Grid + + +O servidor Selenium é instrumentado com rastreamento usando o OpenTelemetry. Cada solicitação ao servidor é rastreada do início ao fim. Cada rastreamento consiste em uma série de segmentos à medida que uma solicitação é executada no servidor. A maioria dos segmentos no servidor Selenium consiste em dois eventos: + +1. Evento normal - registra todas as informações sobre uma unidade de trabalho e marca a conclusão bem-sucedida do trabalho. +2. Evento de erro - registra todas as informações até que ocorra o erro e, em seguida, registra as informações do erro. Marca um evento de exceção. -Selenium server is instrumented with tracing using OpenTelemetry. Every request to the server is traced from start to end. Each trace consists of a series of spans as a request is executed within the server. -Most spans in the Selenium server consist of two events: -1. Normal event - records all information about a unit of work and marks successful completion of the work. -2. Error event - records all information till the error occurs and then records the error information. Marks an exception event. +Executando servidor Selenium -Running Selenium server 1. [Standalone](https://github.com/SeleniumHQ/selenium/wiki/Selenium-Grid-4#standalone-mode) 2. [Hub and Node](https://github.com/SeleniumHQ/selenium/wiki/Selenium-Grid-4#hub-and-node) 3. [Fully Distributed](https://github.com/SeleniumHQ/selenium/wiki/Selenium-Grid-4#fully-distributed) 4. [Docker](https://github.com/SeleniumHQ/selenium/wiki/Selenium-Grid-4#using-docker) -## Visualizing Traces -All spans, events and their respective attributes are part of a trace. Tracing works while running the server in all of the above-mentioned modes. +## Visualizando Rastreamentos +Todos os segmentos, eventos e seus respectivos atributos fazem parte de um rastreamento. O rastreamento funciona enquanto o servidor é executado em todos os modos mencionados acima. + +Por padrão, o rastreamento está habilitado no servidor Selenium. O servidor Selenium exporta os rastreamentos por meio de dois exportadores: + +1. Console - Registra todos os rastreamentos e os segmentos incluídos com nível FINE. Por padrão, o servidor Selenium imprime registros no nível INFO e acima. + +A opção **log-level** pode ser usada para definir um nível de registro de sua escolha ao executar o arquivo JAR do Selenium Grid jar/s. -By default, tracing is enabled in the Selenium server. Selenium server exports the traces via two exporters: -1. Console - Logs all traces and their included spans at FINE level. By default, Selenium server prints logs at INFO level and above. -The **log-level** flag can be used to pass a logging level of choice while running the Selenium Grid jar/s. ```shell java -jar selenium-server-4.0.0-.jar standalone --log-level FINE ``` -2. Jaeger UI - OpenTelemetry provides the APIs and SDKs to instrument traces in the code. Whereas Jaeger is a tracing backend, that aids in collecting the tracing telemetry data and providing querying, filtering and visualizing features for the data. +2. Jaeger UI - OpenTelemetry fornece as APIs e SDKs para instrumentar rastreamentos no código. Enquanto o Jaeger é um sistema de rastreamento de backend que auxilia na coleta de dados de telemetria de rastreamento e oferece recursos de consulta, filtragem e visualização dos dados. -Detailed instructions of visualizing traces using Jaeger UI can be obtained by running the command : +Instruções detalhadas sobre como visualizar rastreamentos usando a interface do Jaeger podem ser obtidas executando o seguinte comando: ```shell java -jar selenium-server-4.0.0-.jar info tracing ``` -[A very good example and scripts to run the server and send traces to Jaeger](https://github.com/manoj9788/tracing-selenium-grid) +[Um exemplo muito bom e scripts para executar o servidor e enviar rastreamentos para o Jaeger](https://github.com/manoj9788/tracing-selenium-grid) + +## Explorando logs de eventos +O rastreamento deve estar habilitado para o registro de eventos, mesmo que alguém não deseje exportar rastreamentos para visualizá-los. + +**Por padrão, o rastreamento está habilitado. Não é necessário passar parâmetros adicionais para ver os logs no console.** -## Leveraging event logs -Tracing has to be enabled for event logging as well, even if one does not wish to export traces to visualize them. -**By default, tracing is enabled. No additional parameters need to be passed to see logs on the console.** -All events within a span are logged at FINE level. Error events are logged at WARN level. +Todos os eventos dentro de um segmento são registrados no nível FINE. Eventos de erro são registrados no nível WARN.. -All event logs have the following fields : - | Field | Field value | Description | -|-|-|-| -| Event time | eventId | Timestamp of the event record in epoch nanoseconds. | -| Trace Id | tracedId | Each trace is uniquely identified by a trace id. | -| Span Id | spanId | Each span within a trace is uniquely identified by a span id. | -| Span Kind | spanKind | Span kind is a property of span indicating the type of span. It helps in understanding the nature of the unit of work done by the Span. | -| Event name | eventName | This maps to the log message. | -| Event attributes | eventAttributes | This forms the crux of the event logs, based on the operation executed, it has JSON formatted key-value pairs. This also includes a handler class attribute, to show the logger class. | +| Campo | Valor do Campo | Descrição | +|------|------|------| +| Hora do Evento | eventId | Carimbo de data/hora do registro do evento em nanossegundos desde a época. | +| ID de Rastreamento | tracedId | Cada rastreamento é identificado exclusivamente por um ID de rastreamento. | +| ID de Segmento | spanId | Cada segmento dentro de um rastreamento é identificado exclusivamente por um ID de segmento. | +| Tipo de Segmento | spanKind | O tipo de segmento é uma propriedade do segmento que indica o tipo de segmento. Isso ajuda a entender a natureza da unidade de trabalho realizada pelo segmento. | +| Nome do Evento | eventName | Isso mapeia para a mensagem de registro. | +| Atributos do Evento | eventAttributes | Isso forma a essência dos registros de eventos, com base na operação executada, ele contém pares chave-valor formatados em JSON. Isso também inclui um atributo de classe do manipulador, para mostrar a classe do registro. | - Sample log + Simples log @@ -129,15 +131,17 @@ All event logs have the following fields : } } -In addition to the above fields, based on [OpenTelemetry specification](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/exceptions.md) error logs consist of : -| Field | Field value | Description | -|-|-|-| -| Exception type | exception.type | The class name of the exception. | -| Exception message | exception.message | Reason for the exception. | -| Exception stacktrace | exception.stacktrace | Prints the call stack at the point of time when the exception was thrown. Helps in understanding the origin of the exception. | +Além dos campos mencionados anteriormente, com base na [especificação do OpenTelemetry](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/semantic_conventions/exceptions.md) os registros de erro consistem nos seguintes campos: : + +| Campo | Valor do Campo | Descrição | +|------|------|------| +| Tipo de Exceção | exception.type | O nome da classe da exceção. | +| Mensagem da Exceção | exception.message | Motivo da exceção. | +| Rastreamento de Exceção | exception.stacktrace | Imprime a pilha de chamadas no momento em que a exceção foi lançada. Ajuda a entender a origem da exceção. | + -Sample error log +Simples error log WARN [LoggingOptions$1.lambda$export$1] - { @@ -156,13 +160,14 @@ Sample error log } } -Note: Logs are pretty printed above for readability. Pretty printing for logs is turned off in Selenium server. -The steps above should set you up for seeing traces and logs. - -## References -1. [Understanding Tracing](https://lightstep.com/blog/opentelemetry-101-what-is-tracing/) -2. [OpenTelemetry Tracing API Specification](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#status) +**Observação:** Os logs são formatados acima para facilitar a leitura. A formatação de logs está desativada no servidor Selenium. + +Os passos acima devem configurá-lo para visualizar rastreamentos e logs. + +## Referências +1. [Compreendendo o Rastreamento](https://lightstep.com/blog/opentelemetry-101-what-is-tracing/) +2. [Especificação da API de Rastreamento do OpenTelemetry](https://github.com/open-telemetry/opentelemetry-specification/blob/master/specification/trace/api.md#status) 3. [Selenium Wiki](https://github.com/SeleniumHQ/selenium/wiki) -4. [Structured logs vs events](https://www.honeycomb.io/blog/how-are-structured-logs-different-from-events/) -5. [Jaeger framework](https://github.com/jaegertracing/jaeger) +4. [Logs Estruturados vs. Eventos](https://www.honeycomb.io/blog/how-are-structured-logs-different-from-events/) +5. [Framework Jaeger](https://github.com/jaegertracing/jaeger) diff --git a/website_and_docs/content/documentation/ie_driver_server/_index.pt-br.md b/website_and_docs/content/documentation/ie_driver_server/_index.pt-br.md index 568be580486..602f4fcdef2 100755 --- a/website_and_docs/content/documentation/ie_driver_server/_index.pt-br.md +++ b/website_and_docs/content/documentation/ie_driver_server/_index.pt-br.md @@ -1,184 +1,183 @@ --- -title: "IE Driver Server" -linkTitle: "IE Driver Server" +title: "Servidor de drivers do IE" +linkTitle: "Servidor de drivers do IE" weight: 8 description: > - The Internet Explorer Driver is a standalone server that implements the WebDriver specification. + O Internet Explorer Driver é um servidor autónomo que implementa a especificação WebDriver. --- -This documentation previously located [on the wiki](https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver-Internals) +Esta documentação estava anteriormente localizada [on the wiki](https://github.com/SeleniumHQ/selenium/wiki/InternetExplorerDriver-Internals) -The `InternetExplorerDriver` is a standalone server which implements WebDriver's wire protocol. -This driver has been tested with IE 11, and on Windows 10. It might work with older versions -of IE and Windows, but this is not supported. +O `InternetExplorerDriver` é um servidor autónomo que implementa o protocolo wire do WebDriver. +Este driver foi testado com o IE 11 e no Windows 10. Ele pode funcionar com versões mais antigas +do IE e do Windows, mas isso não é suportado. -The driver supports running 32-bit and 64-bit versions of the browser. The choice of how to -determine which "bit-ness" to use in launching the browser depends on which version of the -IEDriverServer.exe is launched. If the 32-bit version of `IEDriverServer.exe` is launched, -the 32-bit version of IE will be launched. Similarly, if the 64-bit version of -IEDriverServer.exe is launched, the 64-bit version of IE will be launched. +O controlador suporta a execução de versões de 32 e 64 bits do browser. A escolha de como +determinar qual o "bit-ness" a utilizar no lançamento do browser depende de qual a versão do +IEDriverServer.exe é lançada. Se a versão de 32 bits do `IEDriverServer.exe` for iniciada, +a versão de 32 bits do IE será iniciada. Da mesma forma, se a versão de 64 bits do +IEDriverServer.exe for iniciada, a versão de 64 bits do IE será iniciada. -## Installing +## Instalação -You do not need to run an installer before using the `InternetExplorerDriver`, though some -configuration is required. The standalone server executable must be downloaded from -the [Downloads](https://www.selenium.dev/downloads/) page and placed in your -[PATH](http://en.wikipedia.org/wiki/PATH_(variable)). +Não é necessário executar um instalador antes de usar o `InternetExplorerDriver`, embora seja necessária alguma +configuração seja necessária. O executável do servidor standalone deve ser baixado da página +da página [Downloads](https://www.selenium.dev/downloads/) e colocado no seu +[PATH](http://en.wikipedia.org/wiki/PATH_(variável)). ## Pros -* Runs in a real browser and supports JavaScript +* Funciona num browser real e suporta JavaScript ## Cons -* Obviously the InternetExplorerDriver will only work on Windows! -* Comparatively slow (though still pretty snappy :) +* Obviamente, o InternetExplorerDriver só funciona no Windows! +* Comparativamente lento (embora ainda bastante rápido :) ## Command-Line Switches -As a standalone executable, the behavior of the IE driver can be modified through various -command-line arguments. To set the value of these command-line arguments, you should -consult the documentation for the language binding you are using. The command line -switches supported are described in the table below. All -``, --`` -and /`` are supported. +Como um executável autónomo, o comportamento do controlador IE pode ser modificado através de vários +argumentos de linha de comando. Para definir o valor destes argumentos da linha de comandos, deve +consultar a documentação do language binding que está a utilizar. As opções de linha de comando +suportadas são descritas na tabela abaixo. Todas as opções -``, --`` +e /`` são suportados. -| Switch | Meaning | +| Switch | Significado | |:-------|:--------| -| --port=`` | Specifies the port on which the HTTP server of the IE driver will listen for commands from language bindings. Defaults to 5555. | -| --host=`` | Specifies the IP address of the host adapter on which the HTTP server of the IE driver will listen for commands from language bindings. Defaults to 127.0.0.1. | -| --log-level=`` | Specifies the level at which logging messages are output. Valid values are FATAL, ERROR, WARN, INFO, DEBUG, and TRACE. Defaults to FATAL. | -| --log-file=`` | Specifies the full path and file name of the log file. Defaults to stdout. | -| --extract-path=`` | Specifies the full path to the directory used to extract supporting files used by the server. Defaults to the TEMP directory if not specified. | -| --silent | Suppresses diagnostic output when the server is started. | +| Especifica a porta na qual o servidor HTTP do driver IE escutará os comandos das associações de idioma. O padrão é 5555. | +| Especifica o endereço IP do adaptador de anfitrião no qual o servidor HTTP do controlador IE irá escutar os comandos das Language Bindings. O padrão é 127.0.0.1. | +| --log-level=`` | Especifica o nível em que as mensagens de registo são emitidas. Os valores válidos são FATAL, ERROR, WARN, INFO, DEBUG e TRACE. O padrão é FATAL. | +| --log-file=`` | Especifica o caminho completo e o nome do arquivo de log. O padrão é stdout. | +| --extract-path=`` | Especifica o caminho completo para o diretório usado para extrair arquivos de suporte usados pelo servidor. O padrão é o diretório TEMP se não for especificado. | +| --silent | Suprime a saída de diagnóstico quando o servidor é iniciado. | -## Important System Properties +## Propriedades importantes do sistema -The following system properties (read using `System.getProperty()` and set using -`System.setProperty()` in Java code or the "`-DpropertyName=value`" command line flag) -are used by the `InternetExplorerDriver`: +As seguintes propriedades do sistema (lidas usando `System.getProperty()` e definidas usando +`System.setProperty()` no código Java ou o sinalizador de linha de comando "`-DpropertyName=value`") +são utilizados pelo `InternetExplorerDriver`: -| **Property** | **What it means** | +| **Propriedade** | **O que significa** | |:-------------|:------------------| -| `webdriver.ie.driver` | The location of the IE driver binary. | -| `webdriver.ie.driver.host` | Specifies the IP address of the host adapter on which the IE driver will listen. | -| `webdriver.ie.driver.loglevel` | Specifies the level at which logging messages are output. Valid values are FATAL, ERROR, WARN, INFO, DEBUG, and TRACE. Defaults to FATAL. | -| `webdriver.ie.driver.logfile` | Specifies the full path and file name of the log file. | -| `webdriver.ie.driver.silent` | Suppresses diagnostic output when the IE driver is started. | -| `webdriver.ie.driver.extractpath` | Specifies the full path to the directory used to extract supporting files used by the server. Defaults to the TEMP directory if not specified. | - -## Required Configuration - -* The `IEDriverServer` executable must be [downloaded](https://www.selenium.dev/downloads/) and placed in your [PATH](http://en.wikipedia.org/wiki/PATH_(variable)). -* On IE 7 or higher on Windows Vista, Windows 7, or Windows 10, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode". -* Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog. -* The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates. -* For Windows 10, you also need to set "Change the size of text, apps, and other items" to 100% in display settings. -* For IE 11 _only_, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates. For 32-bit Windows installations, the key you must examine in the registry editor is `HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE`. For 64-bit Windows installations, the key is `HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE`. Please note that the `FEATURE_BFCACHE` subkey may or may not be present, and should be created if it is not present. **Important:** Inside this key, create a DWORD value named `iexplore.exe` with the value of 0. - -## Native Events and Internet Explorer - -As the `InternetExplorerDriver` is Windows-only, it attempts to use so-called "native", or OS-level -events to perform mouse and keyboard operations in the browser. This is in contrast to using -simulated JavaScript events for the same operations. The advantage of using native events is that -it does not rely on the JavaScript sandbox, and it ensures proper JavaScript event propagation -within the browser. However, there are currently some issues with mouse events when the IE -browser window does not have focus, and when attempting to hover over elements. - -### Browser Focus - -The challenge is that IE itself appears to not fully respect the Windows messages we send the -IE browser window (`WM\_MOUSEDOWN` and `WM\_MOUSEUP`) if the window doesn't have the focus. -Specifically, the element being clicked on will receive a focus window around it, but the click -will not be processed by the element. Arguably, we shouldn't be sending messages at all; rather, -we should be using the `SendInput()` API, but that API explicitly requires the window to have the -focus. We have two conflicting goals with the WebDriver project. - -First, we strive to emulate the user as closely as possible. This means using native events -rather than simulating the events using JavaScript. - -Second, we want to not require focus of the browser window being automated. This means that -just forcing the browser window to the foreground is suboptimal. - -An additional consideration is the possibility of multiple IE instances running under multiple -WebDriver instances, which means any such "bring the window to the foreground" solution will -have to be wrapped in some sort of synchronizing construct (mutex?) within the IE driver's -C++ code. Even so, this code will still be subject to race conditions, if, for example, the -user brings another window to the foreground between the driver bringing IE to the foreground -and executing the native event. - -The discussion around the requirements of the driver and how to prioritize these two -conflicting goals is ongoing. The current prevailing wisdom is to prioritize the former over -the latter, and document that your machine will be unavailable for other tasks when using -the IE driver. However, that decision is far from finalized, and the code to implement it is -likely to be rather complicated. - -### Hovering Over Elements - -When you attempt to hover over elements, and your physical mouse cursor is within the boundaries -of the IE browser window, the hover will not work. More specifically, the hover will appear -to work for a fraction of a second, and then the element will revert back to its previous -state. The prevailing theory why this occurs is that IE is doing hit-testing of some sort -during its event loop, which causes it to respond to the physical mouse position when the -physical cursor is within the window bounds. The WebDriver development team has been unable -to discover a workaround for this behavior of IE. - -### Clicking `