Closed manishdube closed 6 years ago
You to write a new function that returns bool
let exists selector =
match someElement selector with
| Some _ -> true
| None -> false
if (exists "Eat better") then click ("#lbl-HealthyChangesImproveDiet-idx"+rnd.Next(0, 5).ToString())
works wonderfully well. Thanks.
How do i use the canopy functions that return a Unit type for bool operations?
for the above line the compiler throw an error saying...
" This expression was expected to have type 'bool'
but here has type 'unit' "