Skip to content
This repository has been archived by the owner on Apr 12, 2024. It is now read-only.

fix: use newPage method #123

Closed
wants to merge 1 commit into from
Closed

fix: use newPage method #123

wants to merge 1 commit into from

Conversation

3794
Copy link
Contributor

@3794 3794 commented Aug 15, 2022

Short description of work done

Used newPage instead of pages in bootstrap.

PR Checklist

  • I have run linter locally
  • I have run unit and integration tests locally
    • Update configuration the newest version (readme and const)
  • Rebased to master branch / merged master

Changes

  • bootstrap - Change browser.pages to browser.newPage method

Issues

Closes #

@3794 3794 requested a review from BeroBurny as a code owner August 15, 2022 13:24
Copy link
Contributor

@BeroBurny BeroBurny left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for taking the time to contribute to a project.

@3794 can you give a rationale why it is better to approach this way?

@3794
Copy link
Contributor Author

3794 commented Aug 21, 2022

Thanks for taking the time to contribute to a project.

@3794 can you give a rationale why it is better to approach this way?

@BeroBurny It did not work like the attached screenshot when run the sample code in the README.(network did not changed)
but the test case (test.spec.ts) works well, so I found the difference and it was the statement.
and when I use that statement, it works well. but I don't know exactly why. What do you think?

// test.spec.ts
testPage = await browser.newPage();
// setup/index.ts
const pages = await browser.pages();
return [dappeteer, pages[0], browser];

Screen Shot 2022-08-22 at 2 44 54 AM

@Tbaut
Copy link
Contributor

Tbaut commented Dec 3, 2022

Thanks for you PR, this is being revamped in #202 and it should be more robust

@Tbaut Tbaut closed this Dec 3, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
Status: Done/Closed
Development

Successfully merging this pull request may close these issues.

None yet

3 participants