Wait for Button and for second page load

There is a command to check colors but in your case you can simply wait for an image to appear. The test image would be a screenshot of the enabled button.

To wait for an image to appear use:

  • store | 360000 | !timeout_wait ← tell visualAssert to wait up 6 minutes for the image to show. The default value is 60s (one minute).
  • visualAssert | image_of_button_normal_color.png ← this automatically waits for the image to appear. It re-checks every second until !timeout_wait limit.

Here you can again use visualAssert to visually check if the new page is loaded. This time with a test image specific/unique to this new page, of course.

PS: All visual commands with image input (XClick, XClickRelative, visualAssert, visualVerify) automatically wait for the image to appear until the !timeout_wait time is reached. I used visualAssert here because it seems best suited for your case.

PPS: For more complicated image-triggered workflows see If {picture} then {do this}

2 Likes