How Selenium works(input exceptions/3:Firefox)
Firefox
![77.0.1](https://selenium-world.net/wp-content/uploads/2020/07/fx_version.png)
Zoom
Use the Ctrl key and “-" combos to decrease the page magnification to 90%.
Button
submit
It is clickable.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_submit_c1-1024x616.png)
<button>
Clickable
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_button_c1-1024x616.png)
image
Clickable
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_img_button_c1-1024x616.png)
Link
Clickable
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_normal_link_c1-1024x616.png)
Text
Enterable
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_textbox_c1-1024x616.png)
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_password_c1-1024x616.png)
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_textarea_c1-1024x616.png)
Select
Selectable
![option2](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_select_c1-1024x616.png)
Radio
Clickable
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_radio3_c1-1024x616.png)
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_radio3_c2-1024x616.png)
CheckBox
Clickable
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_checkbox3_c1-1024x616.png)
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_checkbox3_c2-1024x616.png)
Execution result
Control | Element | Operate | Resul |
---|---|---|---|
Button | submit | click | OK |
button | click | OK | |
image | click | OK | |
Link | normal | click | OK |
img | click | OK | |
css | click | OK | |
Text | textbox | send_key | OK |
password | send_key | OK | |
textarea | send_key | OK | |
Select | select | select | OK |
Radio | radio | click | OK |
label | click | OK | |
CheckBox | checkbox | click | OK |
label | click | OK |
Hidden element
Click “child2" in the pull-down menu.
![pull-down-menu](https://selenium-world.net/wp-content/uploads/2020/07/fx_menu3_c1-1.png)
Menu
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_menu3_c1-1024x616.png)
ElementNotInteractableExceptionMessage: Element <a id="child2" href="#nav_sample"> could not be scrolled into view
<traceback object at 0x0000015C4712C708>
is_displayed()=False
![is_displayed()=False](https://selenium-world.net/wp-content/uploads/2020/07/fx_menu3_c2-1024x616.png)
Another element hides the element
Modal dialog
Click “Menu1" to display the JavaScript Alert dialog.
The Alert dialog is modal.
![alertdialog](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_al_menu1_c1-1024x616.png)
Button
submit
If Selenium clicks the “submit" while the Alert dialog is displayed, the dialog will close and an exception will occur.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_al_submit_c1-1024x616.png)
UnexpectedAlertPresentExceptionAlert Text: None
Message: Dismissed user prompt dialog: Menu1!
<traceback object at 0x0000015C47122748>
With manual operation, you cannot click “submit" and the dialog will not close.
![No response](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_al_button_c1-1024x616.png)
Selenium cannot get the element. An exception occurs.
![](https://selenium-world.net/wp-content/uploads/2020/07/fx_zm_submit_c5-1024x616.png)
In Firefox, the Alert dialog which has a check box will be displayed from the second time, but the result is same.
![dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_al_submit_c8-1024x616.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_al_submit_c9-1024x616.png)
Link
An exception occurs.
Text
Execute “send_keys()" method while the Alert dialog is displayed.
textbox
The dialog closes and an exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_al_textbox_c1-1024x616.png)
UnexpectedAlertPresentExceptionAlert Text: None
Message: Dismissed user prompt dialog: Menu1!
<traceback object at 0x0000015C471226C8>
Select
The dialog closes and an exception occurs.
![](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_al_select_c1-1-1024x616.png)
UnexpectedAlertPresentExceptionAlert Text: None
Message: Dismissed user prompt dialog: Menu1!
<traceback object at 0x0000015C47045908>
Radio / CheckBox
By clicking the button or lable, the Alert dialog closes and an exception occurs.
Execution result
The two dialogs have the same result.
![alert dialog](https://selenium-world.net/wp-content/uploads/2020/07/fx_alert1-1.png)
![](https://en.selenium-world.net/wp-content/uploads/sites/2/2020/07/en-dialog4.png)
Contorl | Element | Operate | Result |
---|---|---|---|
Button | submit | click | Ex |
button | click | Ex | |
image | click | Ex | |
Link | normal | click | Ex |
img | click | Ex | |
css | click | Ex | |
Text | textbox | send_key | Ex |
password | send_key | Ex | |
textarea | send_key | Ex | |
Select | select | select | Ex |
Radio | radio | click | Ex |
label | click | Ex | |
CheckBox | checkbox | click | Ex |
label | click | Ex |
Selenium cannot get the element.
The dialog closes.
Modeless dialog
Click “Menu2" to display the jQuery Modeless dialog.
![dialog](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dialog1-1024x616.png)
Button
submit
With the dialogs overlapping, click the “submit".
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_submit_c1-1024x616.png)
ElementClickInterceptedExceptionMessage: Element <input id="submit" class="btn-submit" type="submit"> is not clickable at point (831,372) because another element <div id="dialog" class="ui-dialog-content ui-widget-content"> obscures it
<traceback object at 0x00000231DA71EA08>
Move the dialog to show the “submit", then click.
It is clickable.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_submit_c2-1024x616.png)
You can click it manually.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_submit_c3-1024x616.png)
is_displayed()=True
![is_displayed()=True](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_submit_c4-1024x616.png)
Link
Selenium cannot click if the element is hidden.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_nromal_link_c1-1024x616.png)
Text
It is enterable if the element is hidden.
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_textbox_c1-1024x616.png)
![hoge](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_textbox_c2-1024x616.png)
Select
An exception occurs if the element is hidden.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_select_c1-1024x616.png)
ElementClickInterceptedExceptionMessage: Element <select id="select"> is not clickable at point (831,483) because another element <p> obscures it
<traceback object at 0x00000231DBDCD4C8>
Radio / CheckBox
It is not clickable if the element is hidden.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_dl_radio3_c1-1024x616.png)
Execution result
Control | Element | Operate | Result |
---|---|---|---|
Button | submit | click | Ex |
button | click | Ex | |
image | click | Ex | |
Link | normal | click | Ex |
img | click | Ex | |
css | click | Ex | |
Text | textbox | send_key | OK |
password | send_key | OK | |
textarea | send_key | OK | |
Select | select | select | Ex |
Radio | radio | click | Ex |
label | click | Ex | |
CheckBox | checkbox | click | Ex |
label | click | Ex |
Ex: An exception occurs if the element is hidden with the dialog overlapping.
Header/Footer
The header/footer is sticky. Those are scroll follow type.
Button
submit
Press “click" in CodeChecker while the “submit" is hidden with the header overlapping.
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_hd_submit_c9-1024x616.png)
Link
Press “click" in CodeChecker while the “Link" is hidden with the footer overlapping.
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_hd_normal_link_c1-1024x616.png)
Text
textbox
It is enterable if the element is hidden.
![文字入力](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_hd_textbox_c2-1024x616.png)
Select
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_hd_select_c1-1024x616.png)
lementClickInterceptedExceptionMessage: Element <select id="select"> is not clickable at point (831,922) because another element <div id="footer"> obscures it
<traceback object at 0x00000231DA78A108>
Radio / CheckBox
Press “click" in CodeChecker while the “radio_3" is hidden with the header overlapping.
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/fx_hide_hd_radio3_c2-1024x616.png)
Execution result
Control | Element | Operate | Result |
---|---|---|---|
Button | submit | click | Ex |
button | click | Ex | |
image | click | Ex | |
Link | normal | click | Ex |
img | click | Ex | |
css | click | Ex | |
Text | textbox | send_key | OK |
password | send_key | OK | |
textarea | send_key | OK | |
Select | select | select | Ex |
Radio | radio | click | Ex |
label | click | Ex | |
CheckBox | checkbox | click | Ex |
label | click | Ex |
Discussion
New Comments
No comments yet. Be the first one!