How to get dynamic URL from ChildWindow using cypress

455 views Asked by At

I will click on button , it will then popup child window having dynamic URL each time. Now i need to grab the dynamic URL and place it in cy.visit() and automate the things in child window

I tried in many ways, but couldn't solve the issue

1

There are 1 answers

0
jjhelguero On

These resources are great, gleb blog filip blog.

With no DOM details shown, you may be able to remove a target attr from the anchor and then click() to visit the link.

cy.get('a')
  .invoke('removeAttr', 'target')
  .click()