Problem with Focusing Back In Page After Pop Up

I am having an issue where sometimes the final button found in Step #3 will be clicked as seen in this image Screenshot by Lightshot or sometimes it won’t be clicked.

Here is the scenario:

Step #1 - text is entered into the pop up box (this works perfectly every time)

Step #2 - the save button is clicked and some times it takes a few seconds to load.

Step #3 - to try and limit the errors I have added the following code which still is not making it perfect:

  • After step #2 I even have the solution select a tab within the page where the button titled “Run Search is found” and still i do the following and have issues for some reason:
  1. Pause 3000
  2. bringBrowserToForeground
  3. selectWindow
  4. WaitForElmentVisible
  5. I click and even XClick (sometimes it still misses the button)

Any help on why this button is being skipped meaning its not erroring out because of the page not loading its erroring out because it was skipped would be awesome?

I am running the solution in fast mode!! The only thing I havent tried is slowing down the page which I do not know how to do just for a specific call?

Regarding the button not being clicked all the time, you can try using a different Locator like CSS tag and ID or Tag and Class. You can read more here:

Now, for slowing down the execution of the Macro you can use the following line just before the Step #3:
and after the step is done, just set the Line:

Awesome, so far the slowing down is helping which is odd as it works on all other tabs except that one! So weird!! Thanks for the help