Execute next step on tab B while tab A is still loading

I have a test script that opens two tabs at the beginning. I need to know if there is a way to move to the next step in the testcase script (which performs actions on the other tab) before the previous tabs page has loaded?

Steps:

  1. The script clicks on a button within the tab A .

Expected Result:
Tab A then waits for the actions to be completed on tab B, before navigating back to tab A

.Actual Result:
The script is hanging on step 1

If I’ve understood you correctly, yes. However, there are a couple of points of ambiguity in your post which could easily lead to confusion.

  1. There are two tabs at the beginning. Then you mention “other tab”. Is that a third tab? Or Tab A or Tab B?

  2. Tab A should wait for Tab B then navigate back to Tab A. How can Tab A navigate back to Tab A???

I think you want this:

  1. From Tab A, click on a button.
  2. Switch to Tab B.
  3. Conduct actions in Tab B
  4. Switch back to Tab A.
  5. Continue in Tab A.

If that’s correct, all you need is WebUI.switchToWindowIndex (or similar)