The Agile Way — Practical Automated E2E Testing

The Agile Way — Practical Automated E2E Testing

Selenium Training Workbook

11 Execution Tests in Tools and from Command Line.

Various ways of execution test scripts.

Zhimin Zhan's avatar
Zhimin Zhan
Nov 26, 2022
∙ Paid

Learning Objectives

  • Review

    • run test case

    • run test script

    • check a control’s state

  • Add Conditional in scripts: `if` and `unless’

  • Run all test scripts in a folder

  • Run test scripts from the command line

Test Case 11

A checkbox has two states: on and off. If a checkbox is already checked, the following step will uncheck it.

Tasks

Task 1. Check a checkbox safely

The following click a checkbox regardless of its state, it is more like a toggling operation.

driver.find_element(:id, “remember_me").click

To safely check a checkbox, we need to check its current state first. Only if it is not checked, click the checkbox.

User's avatar

Continue reading this post for free, courtesy of Zhimin Zhan.

Or purchase a paid subscription.
© 2025 Zhimin Zhan · Privacy ∙ Terms ∙ Collection notice
Start your SubstackGet the app
Substack is the home for great culture