Mario
Mario

Reputation: 4998

What is the correct way to check a boolean value?

I am trying to verify that the number of div elements is equal To this end I am trying the following:

command: execute script
target: return document.querySelectorAll('app-chat div.card div.chat-body div.chat-content perfect-scrollbar div div.ps-content div.scrollable-content div > div').length
value: divCount

command: click
target: css=app-chat  div.card > div:last-child > div > div button

command: execute script
target: return document.querySelectorAll('app-chat div.card div.chat-body div.chat-content perfect-scrollbar div div.ps-content div.scrollable-content div > div').length
value: newDivCount

command: execute script
target: return ${divCount} == ${newDivCount}
value: result

I can confirm through the echo command that the values ​​of divCount, newDivcount and result are as expected

Trying to confirm this in this way

command: assert
target: ${result}
value: true

I get the following message

assert on ${result} with value true Failed:
Actual value 'undefined' did not match 'true'

What is the correct way to check a boolean value?

Upvotes: 0

Views: 30

Answers (0)

Related Questions