How Selenium works(input exceptions/2:Chrome)
Google Chrome
![83.0.4103.116(64bit)](https://selenium-world.net/wp-content/uploads/2020/07/ch_version.png)
Zoom
Use the Ctrl key and “-" combos to decrease the page magnification to 90%.
Button
submit
Not clickable.
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_submit_c1-1024x616.png)
is_enabled()=Ture
![is_enabled=True](https://selenium-world.net/wp-content/uploads/2020/07/ch_submit_c2-1024x616.png)
Set zoom level to 100%, Selenium can click it.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ch_submit_c3-1024x616.png)
<button>
Not clickable
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_button_c1-1024x616.png)
image
Not clickable
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_img_button_c1-1024x616.png)
Link
Not clickable
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_normal_link_c1-1024x612.png)
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_img_link_c1-1024x612.png)
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_css_link_c1-1024x612.png)
Text
Enterable
![hoge](https://selenium-world.net/wp-content/uploads/2020/07/ch_textbox_c1-1024x612.png)
![hoge](https://selenium-world.net/wp-content/uploads/2020/07/ch_password-1024x612.png)
![hoge](https://selenium-world.net/wp-content/uploads/2020/07/ch_textarea_c1-1024x612.png)
Select
Selectable
![option2No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_select_c1-1024x612.png)
Radio
Not clickable
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_radio_c1-1024x612.png)
The label is not clickable.
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_radio_c2-1024x612.png)
CheckBox
Not clickable
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_checkbox_c1-1024x612.png)
Execution result
Control | Element | Operate | Result |
---|---|---|---|
Button | submit | click | NG |
button | click | NG | |
image | click | NG | |
Link | normal | click | NG |
img | click | NG | |
css | click | NG | |
Text | textbox | send_key | OK |
password | send_key | OK | |
textarea | send_key | OK | |
Select | select | select | OK |
Radio | radio | click | NG |
label | click | NG | |
CheckBox | checkbox | click | NG |
label | click | NG |
Hidden element
Click “child2" in the pull-down menu.
![pull-down-menu](https://selenium-world.net/wp-content/uploads/2020/07/ch_menu3_c2.png)
Menu
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_menu3_c1-1024x616.png)
ElementNotInteractableExceptionMessage: element not interactable
(Session info: chrome=83.0.4103.116)
<traceback object at 0x000001F423F894C8>
is_displayed()=False
![is_displayed()=False](https://selenium-world.net/wp-content/uploads/2020/07/ch_menu3_c3-1024x616.png)
Selenium can click normal menu.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ch_menu1_c1-1024x616.png)
Another element hides the element
Modal dialog
Click “Menu1" to display the JavaScript Alert dialog.
The Alert dialog is modal.
![alert dialog](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_alert1-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/ch_hide_submit_c1-1024x616.png)
UnexpectedAlertPresentExceptionAlert Text: Menu1!
Message: unexpected alert open: {Alert text : Menu1!}
(Session info: chrome=83.0.4103.116)
<traceback object at 0x000001F423F7D408>
With manual operation, you cannot click “submit" and the dialog will not close.
![Not clickable](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_submit_c2-1024x615.png)
Selenium cannot get the element. An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_alert_submit_c3-1024x616.png)
<button>
The dialog closes and an exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_button_c1-1024x615.png)
image
The dialog closes and an exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_img_button_c1-1024x616.png)
Link
Exceptions occur for normal_link, img_link, and css_link.
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/ch_hide_textbox_c1-1024x616.png)
UnexpectedAlertPresentExceptionAlert Text: Menu1!
Message: unexpected alert open: {Alert text : Menu1!}
(Session info: chrome=83.0.4103.116)
<traceback object at 0x000001F423FB8308>
Select
The dialog closes and an exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_select_c1-1024x616.png)
UnexpectedAlertPresentExceptionAlert Text: Menu1!
Message: unexpected alert open: {Alert text : Menu1!}
(Session info: chrome=83.0.4103.116)
<traceback object at 0x000001F423FB8308>
Radio / CheckBox
By clicking the button or lable, the Alert dialog closes and an exception occurs.
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 | 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/ch_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/ch_hide_dl_submit_c1-1024x616.png)
ElementClickInterceptedExceptionMessage: element click intercepted: Element <input type="submit" id="submit" value="submit" class="btn-submit"> is not clickable at point (831, 371). Other element would receive the click: <div id="dialog" style="width: auto; min-height: 90px; max-height: none; height: auto;" class="ui-dialog-content ui-widget-content">...</div>
(Session info: chrome=83.0.4103.116)
<traceback object at 0x000002F721D2FA08>
Move the dialog to show the “submit", then click.
It is clickable.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_submit_c2-1024x616.png)
You can click it manually.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_submit_c3-1024x616.png)
is_displayed()=True
![is_displayed()=True](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_submit_c5-1024x616.png)
<button>
A part of the <button> is visible, but an exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_button_c1-1024x616.png)
Display it a little more, Selenium can click it.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_button_c2-1024x616.png)
Link
Selenium cannot click if the element is hidden.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_normal_link_c1-1024x616.png)
It is clickable if the element is visible.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_normal_link_c2-1024x616.png)
Text
It is enterable if the element is hidden.
textbox
![](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_textbox_c1-1024x616.png)
![hoge](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_textbox_c2-1024x616.png)
password
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_password_c1-1024x616.png)
textarea
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_textarea_c1-1024x616.png)
Select
It is selectable if the element is hidden.
![option2No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_select_c1-1024x616.png)
![option2](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_select_c2-1024x616.png)
Radio / CheckBox
It is not clickable if the element is hidden.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_radio3_c1-1024x616.png)
![Radio_3No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_dl_radio3_c2-1024x616.png)
Execution result
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 | OK |
password | send_key | OK | |
textarea | send_key | OK | |
Select | select | select | OK |
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.
![submit](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_submit_c1-1024x616.png)
ElementClickInterceptedExceptionMessage: element click intercepted: Element <input type="submit" id="submit" value="submit" class="btn-submit"> is not clickable at point (831, 15). Other element would receive the click: <p id="sitename">...</p>
(Session info: chrome=83.0.4103.116)
<traceback object at 0x0000015C11CB2688>
is_displayed() =True
![is_displayed()=True](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_submit_c2-1024x616.png)
<button>
![button](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_button_c1-1024x616.png)
image
![image](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_img_button_c1-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/ch_hide_hd_normal_link_c1-1024x616.png)
Text
It is enterable if the element is hidden.
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_textbox_c1-1024x616.png)
![hoge](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_textbox_c2-1024x616.png)
Select
It is selectable.
![option2No response](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_select_c1-1024x616.png)
![option2](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_select_c2-1024x616.png)
Radio / CheckBox
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ch_hide_hd_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 | OK |
Radio | radio | click | Ex |
label | click | Ex | |
CheckBox | checkbox | click | Ex |
label | click | Ex |
Discussion
New Comments
No comments yet. Be the first one!