Information about web elements
There are a number of details you can query about a specific element.
Is Displayed
This method is used to check if the connected Element is
displayed on a webpage. Returns a Boolean
value,
True if the connected element is displayed in the current
browsing context else returns false.
This functionality is mentioned in, but not defined by the w3c specification due to the impossibility of covering all potential conditions. As such, Selenium cannot expect drivers to implement this functionality directly, and now relies on executing a large JavaScript function directly. This function makes many approximations about an element’s nature and relationship in the tree to return a value.
Is Enabled
This method is used to check if the connected Element is enabled or disabled on a webpage. Returns a boolean value, True if the connected element is enabled in the current browsing context else returns false.
Elemento está selecionado
Este método determina se o elemento referenciado é Selected ou não. Este método é amplamente utilizado em caixas de seleção, botões de opção, elementos de entrada e elementos de opção.
Retorna um valor booleano, true se o elemento referenciado for selected no contexto de navegação atual, caso contrário, retorna false.
Coletar TagName do elemento
É usado para buscar o TagName do elemento referenciado que tem o foco no contexto de navegação atual.
Coletar retângulo do elemento
É usado para buscar as dimensões e coordenadas do elemento referenciado.
O corpo de dados buscado contém os seguintes detalhes:
- Posição do eixo X a partir do canto superior esquerdo do elemento
- posição do eixo y a partir do canto superior esquerdo do elemento
- Altura do elemento
- Largura do elemento
Coletar valor CSS do elemento
Recupera o valor da propriedade de estilo computado especificada de um elemento no contexto de navegação atual.
Coletar texto do elemento
Recupera o texto renderizado do elemento especificado.
Fetching Attributes or Properties
Fetches the run time value associated with a DOM attribute. It returns the data associated with the DOM attribute or property of the element.