The Agile Way

The Agile Way

Share this post

The Agile Way
The Agile Way
11 Execution Tests in Tools and from Command Line.
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
1

Share this post

The Agile Way
The Agile Way
11 Execution Tests in Tools and from Command Line.
Share

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.

Keep reading with a 7-day free trial

Subscribe to The Agile Way to keep reading this post and get 7 days of free access to the full post archives.

Already a paid subscriber? Sign in
© 2025 Zhimin Zhan
Privacy ∙ Terms ∙ Collection notice
Start writingGet the app
Substack is the home for great culture

Share