CLOSING BROSWER TABS

My web application opens a new tab when a button is clicked. I want to be able to close the new tab once I'm done with it and continue working with the original tab. How can I achieve this?

The application runs of Chrome.

  • Suggested Answer

    0

    ' Switch to the new tab (second tab opened)
    Browser("CreationTime:=1").Page("title:=Your Page Title").Sync

    ' Perform your actions on the new tab For example, click a button
    Browser("CreationTime:=1").Page("title:=Your Page Title").WebButton("name:=Submit").Click

    ' Close the new tab
    Browser("CreationTime:=1").Close

    ' Switch back to the original tab
    Browser("CreationTime:=0").Page("title:=Original Page Title").Sync

    ' Continue with your actions on the original tab

    Note:Replace "Your Page Title" and "Original Page Title" with the actual titles of your pages.