How do i wait for element on screen to be displayed? (python)

in ruby I use

wait { button_exact('my_button').click }

Its ugly, but you can also use a while and change the count limit and sleep, like

count = 0
while buttons('my_button').size == 0 and count < 10 do
   sleep 0.5
   count += 1
end
1 Like