How Selenium works(elements status/3:Firefox)
Firefox

Button
Click
First, enter the id of the element in the locator field and press the “id" button. Next, press the “click" button.
If successful, the executed code of Python is displayed.
Normal

Inactive(disabled)

Inactive(pointer-events:none)

ElementClickInterceptedExceptionMessage: Element <input id="submit3" class="btn-submit" type="submit"> is not clickable at point (831,446) because it does not have pointer events enabled, and element <div> would receive the click instead
<traceback object at 0x000001CC524FF348>
Read-only(readonly)

Hidden(display:none)

ElementNotInteractableExceptionMessage: Element <input id="submit5" class="btn-submit" type="submit"> could not be scrolled into view
<traceback object at 0x000001CC50E99E08>
Hidden(visibility:hidden)

Get Attribute
Normal

Inactive(disabled)

Inactive(pointer-events:none)

Read-only(readonly)

Hidden(display:none)

Hidden(visibility:hidden)

Result
Button | click | is_displayed | is_enabled | readonly | note |
---|---|---|---|---|---|
normal | OK | True | True | None | |
disabled | NG | True | False | None | |
pointer-events:none | Ex | True | True | None | |
readonly | OK | True | True | true | |
display:none | Ex | False | True | None | |
visibility:hidden | Ex | False | True | None |
Link
Inactive(disabled)
There is no “disabled" attribute for <a> tag. That is invalid.


Result
Link | click | is_displayed | is_enabled | readonly |
---|---|---|---|---|
normal | OK | True | True | None |
disabled | OK | True | True | None |
pointer-events:none | Ex | True | True | None |
readonly | OK | True | True | true |
display:none | Ex | False | True | None |
visibility:hidden | Ex | False | True | None |
Text
Inactive(disabled)

ElementNotInteractableExceptionMessage: Element <input id="textbox2" type="text"> is not reachable by keyboard
<traceback object at 0x000001A24CE10F08>
Hidden(display:none)

ElementNotInteractableExceptionMessage: Element <input id="textbox5" type="text"> is not reachable by keyboard
<traceback object at 0x000001A249B6EC88>
Result
Text | send_keys | get value | is_displayed | is_enabled | readonly |
---|---|---|---|---|---|
noraml | OK | OK | True | True | None |
disabled | Ex | OK | True | False | None |
pointer-events:none | OK | OK | True | True | None |
readonly | NG | OK | True | True | true |
display:none | Ex | OK | False | True | None |
visibility:hidden | Ex | OK | False | True | None |
Select
Inactive(disabled)
“<select>" is disabled, but “option2" was selected.
Not selectable manually.

Inactive(pointer-events:none)
Exception occurred

ElementClickInterceptedExceptionMessage: Element <select id="select3"> is not clickable at point (831,564) because it does not have pointer events enabled, and element <div> would receive the click instead
<traceback object at 0x000001A24CE14848>
Hidden(display:none)
Exception occurred

An empty character is returned.

Result
Select | select item | get selected item | is_displayed | is_enabled | readonly | note |
---|---|---|---|---|---|---|
normal | OK | OK | True | True | None | |
disabled | OK* | OK | True | False | None | *Not selectable manually |
pointer-events:none | Ex | OK | True | True | None | |
readonly | OK | OK | True | True | true | |
display:none | Ex | NG* | False | True | None | *Empty is returned |
visibility:hidden | Ex | NG* | False | True | None | *Empty is returned |
Select(option)
Inactive(pointer-events:none)
“option2" is selected.

Hidden(display:none)
“option2" is hidden, but it can be selected.


“option2" is hidden, but “is_displayed()" is “True".

Hidden(visibility:hidden)
“option2" is selected.

In Firefox, it seems that “visibility:hidden" is invalid for “option" of “<select>".

Result
Select (option) |
select item | get selected item | is_displayed | is_enabled | readonly | note |
---|---|---|---|---|---|---|
normal | OK | OK | True | True | None | |
disabled | NG | OK | True | False | None | |
pointer-events:none | OK | OK | True | True | None | |
readonly | OK | OK | True | True | true | |
display:none | OK* | OK | True | True | None | *Not selectable manually |
visibility:hidden | OK | OK | True | True | None |
Radio
Inactive(pointer-events:none)

ElementClickInterceptedExceptionMessage: Element <input id="radio_3" name="radio" type="radio"> is not clickable at point (800,389) because it does not have pointer events enabled, and element <div> would receive the click instead
<traceback object at 0x000001F89703BD48>
Hidden(display:none)

ElementNotInteractableExceptionMessage: Element <input id="radio_5" name="radio" type="radio"> could not be scrolled into view
<traceback object at 0x000001F89703B548>
You can check the radio by clicking label.

Result
Radio | click button | click label | get value | is_displayed | is_enabled | readonly |
---|---|---|---|---|---|---|
normal | OK | OK | OK | True | True | None |
disabled | NG | NG | OK | True | False | None |
pointer-events:none | Ex | OK | OK | True | True | None |
readonly | OK | OK | OK | True | True | true |
display:none | Ex | OK | OK | False | True | None |
visibility:hidden | Ex | OK | OK | False | True | None |
CheckBox
It was the same result as Radio.
Result
CheckBox | click button | click label | get value | is_displayed | is_enabled | readonly |
---|---|---|---|---|---|---|
normal | OK | OK | OK | True | True | None |
disabled | NG | NG | OK | True | False | None |
pointer-events:none | Ex | OK | OK | True | True | None |
readonly | OK | OK | OK | True | True | true |
display:none | Ex | OK | OK | False | True | None |
visibility:hidden | Ex | OK | OK | False | True | None |
Discussion
New Comments
No comments yet. Be the first one!