79147173

Date: 2024-11-01 07:01:20
Score: 2
Natty:
Report link

when the checkbox is unchecked, the xpath or id is different than when it is checked which means, then while finding the element,we need to

  1. find some common text that is present in the xpath in both checked and unchecked condition

  2. use it to locate the object

  3. then compare the xpath of checked checkbox and unchecked checkbox

    if (xpath of checked checkbox): pass else: chkbox.click()

Reasons:
  • No code block (0.5):
  • Starts with a question (0.5): when the
  • Low reputation (1):
Posted by: Wisp