How Selenium works(input exceptions/5:IE)
Internet Explorer
![11.973.17763.0](https://selenium-world.net/wp-content/uploads/2020/07/ie_version.png)
Behavior of click() method
In IE, the click method does not work simply.
The first click gives the control focus, and the second click raises the click event.
The first click sets the focus to the control.
![get focus](https://selenium-world.net/wp-content/uploads/2020/07/ie_submit1_c1-1024x616.png)
The second click raises the click event.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ie_submit1_c2-1024x616.png)
Zoom
In IE, click the Tools button, select Zoom in the menu and tap Custom in the sub-list.
![](https://en.selenium-world.net/wp-content/uploads/sites/2/2020/07/en_Custom_Zoom.png)
Button
submit
It is not clickable. The control does not get focus.
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ie_zm_submit_c1-1024x616.png)
is_enabled()=Ture
![is_displayed()=True](https://selenium-world.net/wp-content/uploads/2020/07/ie_zm_submit_c2-1024x616.png)
Link
It is not clickable.
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ie_zm_normal_link_c1-1024x616.png)
Text
Enterable
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/ie_zm_textbox_c1-1024x616.png)
Select
Selectable
![option2](https://selenium-world.net/wp-content/uploads/2020/07/ie_zm_select_c1-1024x616.png)
Radio / CheckBox
Not clickable
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ie_zm_radio3_c1-1024x616.png)
The label is not clickable.
![No response](https://selenium-world.net/wp-content/uploads/2020/07/ie_zm_radio3_c2-1024x616.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/ie_menu3_c1.png)
Menu
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_menu3_c2-1024x616.png)
ElementNotInteractableExceptionMessage: Element is not displayed
<traceback object at 0x0000012DBE081648>
is_displayed()=False
![is_displayed()=False](https://selenium-world.net/wp-content/uploads/2020/07/ie_menu3_c3-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/ie_hide_alert1-1024x616.png)
There are two types of dialogs in IE on Windows10. The dialog will be displayed with a checkbox when displayed several times.
That has a checkbox and the following message.
“Don’t let this page create more messages"
![alert dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_alert2-1024x616.png)
Button
The result is different between “with normal" and “with checkbox".
Dialog with normal
If Selenium clicks the “submit" while the Alert dialog is displayed, the dialog will close and an exception will occur.
![alert dialog with normal](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_sumit_c1-1024x616.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_sumit_c2-1024x616.png)
UnexpectedAlertPresentExceptionAlert Text: Menu1!
Message: Modal dialog present with text: Menu1!
<traceback object at 0x0000012DBE0AE848>
Selenium cannot get the element. An exception occurs.
with checkbox
If Selenium clicks the “submit" while the Alert dialog is displayed, the dialog will close and a click event will occur.
![alert dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_sumit_c3-1024x616.png)
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_sumit_c4-1024x616.png)
It is clickable if the element is hidden.
![alert dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_sumit_c6-1024x616.png)
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_sumit_c7-1024x616.png)
With manual operation, you cannot click “submit" and the dialog will not close.
![Not clickable](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_sumit_c5-1024x616.png)
Link
with normal
An exception occurs.
![alert dialog with normal](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_normal_link_c1-1024x616.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_normal_link_c2-1024x616.png)
with checkbox
It is clickable.
![alert dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_normal_link_c3-1024x616.png)
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_normal_link_c4-1024x616.png)
Text
with normal
An exception occurs.
![alert dialog with normal](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_textbox_c1-1024x616.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_textbox_c2-1024x616.png)
with checkbox
Enterable
![alert dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_textbox_c3-1024x616.png)
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_textbox_c4-1024x616.png)
Select
with normal
An exception occurs.
![alert dialog with normal](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_select_c1-1024x616.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_select_c2-1024x616.png)
with checkbox
Selectable
![alert dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_select_c3-1024x616.png)
![option2](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_select_c4-1024x616.png)
Radio / CheckBox
with normal
An exception occurs.
![alert dialog with normal](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_radio_3_c1-1024x616.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_radio_3_c2-1024x616.png)
with checkbox
Clickable
![alert dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_radio_3_c3-1024x616.png)
![Radio_3](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_al_radio_3_c4-1024x616.png)
Execution result
Alert dialog with normal
![](https://en.selenium-world.net/wp-content/uploads/sites/2/2020/07/en-dialog1.png)
The dialog will close and an exception will occur.
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.
Alert dialog with checkbox on Window10
![](https://en.selenium-world.net/wp-content/uploads/sites/2/2020/07/en-dialog2.png)
The dialog will close and an event will occur.
Control | Element | Operate | Result |
---|---|---|---|
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 |
confirm / prompt dialog
Javascript has a confirm dialog and a prompt dialog. But the result was different from the Alert dialog.
confirm dialog
An exception occurs in both “with normal" and “with checkbox".
with normal
![confirm dialog with normal](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_confirm_c1-1024x690.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_confirm_c2-1024x690.png)
with checkbox
![confirm dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_confirm_c3-1024x690.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_confirm_c4-1024x690.png)
prompt dialog
An exception occurs in both.
with normal
![prompt dialog with normal](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_prompt_c1-1024x690.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_prompt_c2-1024x690.png)
with checkbox
![prompt dialog with checkbox](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_prompt_c3-1024x690.png)
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_prompt_c4-1024x690.png)
Modeless dialog
Click “Menu2" to display the jQuery Modeless dialog.
![dialog](https://selenium-world.net/wp-content/uploads/2020/07/ie_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/ie_hide_dl_submit_c1-1024x616.png)
ElementClickInterceptedExceptionMessage: Element not clickable at point (832,367). Other element would receive the click: <p>This dialog is specfied "z-index:999".<br>
<traceback object at 0x000002470A8BBD48>
Move the dialog to show the “submit", then click. It is clickable.
But In IE, the first click gives the control focus, and the second click raises the click event.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_dl_submit_c2-1024x616.png)
You can click it manually.
![clickable](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_dl_submit_c3-1024x616.png)
is_displayed()=True
![is_displayed()=True](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_dl_submit_c4-1024x616.png)
Link
Selenium cannot click if the element is hidden.
Text
It is enterable if the element is hidden.
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_dl_textbox_c1-1024x616.png)
![hoge](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_dl_textbox_c2-1024x616.png)
Select
It is selectable if the element is hidden.
![option2](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_dl_select_c1-1024x616.png)
![option2](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_dl_select_c2-1024x616.png)
Radio / CheckBox
It is not clickable if the element is hidden.
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 | 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.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_hd_submit_c1-1024x616.png)
ElementClickInterceptedExceptionMessage: Element not clickable at point (832,86). Other element would receive the click: <a id="menu2" onclick="show_dialog()" href="#nav_sample">Menu2</a>
<traceback object at 0x0000027BE1149048>
is_displayed()=True
![is_displayed()=True](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_hd_submit_c2-1024x616.png)
Link
Press “click" in CodeChecker while the “Link" is hidden with the header overlapping.
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_hd_normal_link_c1-1024x616.png)
Text
textbox
It is enterable if the element is hidden.
![send_keys](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_hd_textbox_c1-1024x616.png)
![hoge](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_hd_textbox_c2-1024x616.png)
Select
Selectable
![option2](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_hd_select_c1-1024x616.png)
![option2](https://selenium-world.net/wp-content/uploads/2020/07/ie_hide_hd_select_c2-1024x616.png)
Radio / CheckBox
Press “click" in CodeChecker while the “radio_3" is hidden with the fotter overlapping.
An exception occurs.
![exception](https://selenium-world.net/wp-content/uploads/2020/07/ie_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!