How Selenium works(input exceptions/1:Summary)

2020-07-29

Test page

Test page

The header/footer is sticky. Those are scroll follow type.

Check items

  1. Zoom out to 90% in each browser
  2. Hidden element
  3. Another element hides the element
    1. Modal dialog
    2. Modeless dialog
    3. Header/Footer

Operating procedure

  1. Google Chrome
  2. Firefox
  3. Microsoft Edge
  4. Internet Explorer

Execution result

1.Zoom

  • send_keys() and select : OK
  • click() : OK in only Firefox. No response in Chrome, Edge and IE.
  • Those have the same results in Chrome, Edge and IE.
Control Element Operate chr Fx Edge IE Note
Button submit click NG OK NG NG  
button click NG OK NG NG  
image click NG OK NG NG  
Link normal click NG OK NG NG  
img click NG OK NG NG  
css click NG OK NG NG  
Text textbox send_key OK OK OK OK  
password send_key OK OK OK OK  
textarea send_key OK OK OK OK  
Select select select OK OK OK OK  
Radio radio click NG OK NG NG  
label click NG OK NG NG  
CheckBox checkbox click NG OK NG NG  
label click NG OK NG NG  

NG: No response

2.Hidden element

An exception occurs by clicking the element which status is “is_displayed=False" as in elements status.

Control Ope chr Fx Edge IE Note
pull-down-menu click Ex Ex Ex Ex is_displayed()=False

3-1.Modal dialog (Alert dialog)

  • There are two types of dialogs in Firefox and IE on Windows10.
    • One is normal
    • The other has a checkbox and the following message.
      “Don’t let this page create more messages"
  • IE
    • The dialog which has a checkbox : OK
      The “click()" method closes the dialog, and raises click event.
    • Normal dialog
      An exception occurs
  • Chrome / Firefox / Edge
    • An exception occurs

Chrom / Firefox / Ege

Control Element Operate chr Fx Edge Note
Button submit click Ex Ex Ex  
button click Ex Ex Ex  
image click Ex Ex Ex  
Link normal click Ex Ex Ex  
img click Ex Ex Ex  
css click Ex Ex Ex  
Text textbox send_key Ex Ex Ex  
password send_key Ex Ex Ex  
textarea send_key Ex Ex Ex  
Select select select Ex Ex Ex  
Radio radio click Ex Ex Ex  
label click Ex Ex Ex  
CheckBox checkbox click Ex Ex Ex  
label click Ex Ex Ex  

Cannot get the element with “find_element" method.

IE

Normal
There is a checkbox.
Control Element Operate Normal Check Note
Button submit click Ex OK  
button click Ex OK  
image click Ex OK  
Link normal click Ex OK  
img click Ex OK  
css click Ex OK  
Text textbox send_key Ex OK  
password send_key Ex OK  
textarea send_key Ex OK  
Select select select Ex OK  
Radio radio click Ex OK  
label click Ex OK  
CheckBox checkbox click Ex OK  
label click Ex OK  

Normal: Cannot get the element.
Check: Operable even if the dialog hides the element.

3-2.Modeless dialog

  • If the dialog hides the element:
    • click(): An exception occurs
    • send_key(): OK
    • select: OK in Chrome, Edge and IE. An exception occurs in Firefox,
  • If the element is visible: OK
  • Those have the same results in Chrome, Edge and IE.
Control Element Ope chr Fx Edge IE Note
Button submit click Ex* Ex* Ex* Ex*

*

The dialog hides the element:Exception


The element is visible:OK

button click Ex* Ex* Ex* Ex*
image click Ex* Ex* Ex* Ex*
Link normal click Ex* Ex* Ex* Ex*
img click Ex* Ex* Ex* Ex*
css click Ex* Ex* Ex* Ex*
Text textbox send_key OK OK OK OK
password send_key OK OK OK OK
textarea send_key OK OK OK OK
Select select select OK Ex* OK OK
Radio radio click Ex* Ex* Ex* Ex*
label click Ex* Ex* Ex* Ex*
CheckBox checkbox click Ex* Ex* Ex* Ex*
label click Ex* Ex* Ex* Ex*

3-3.Header/Footer

Those have the same results in the case of modeless dialog.

Control Element Ope chr Fx Edge IE Note
Button submit click Ex* Ex* Ex* Ex*

*

The dialog hides the element:Exception


The element is visible:OK

button click Ex* Ex* Ex* Ex*
image click Ex* Ex* Ex* Ex*
Link normal click Ex* Ex* Ex* Ex*
img click Ex* Ex* Ex* Ex*
css click Ex* Ex* Ex* Ex*
Text textbox send_key OK OK OK OK
password send_key OK OK OK OK
textarea send_key OK OK OK OK
Select select select OK Ex* OK OK
Radio radio click Ex* Ex* Ex* Ex*
label click Ex* Ex* Ex* Ex*
CheckBox checkbox click Ex* Ex* Ex* Ex*
label click Ex* Ex* Ex* Ex*

2020-07-29Selenium Tips

Posted by sj