CodeceptJS icon indicating copy to clipboard operation
CodeceptJS copied to clipboard

I.grabCurrentUrl() does not return the url of the new tab opened but returns the url of parent

Open mystic-poet opened this issue 3 years ago • 1 comments

I am trying to fetch URL of the new tab that is opened from clicking a link in the main tab

The new tab's url is not given, instead the parent tab's url is provided

Details

  • CodeceptJS version: CodeceptJS v3.2.2
  • NodeJS Version: v16.13.0
  • Operating System: Windows 10
  • puppeteer

mystic-poet avatar Feb 17 '22 14:02 mystic-poet

You can try I.switchToNextTab() after clicking on the link. It works for me with Playwright.

mirao avatar May 30 '22 14:05 mirao