You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
See the attached picture for my code.
I need to automate chat functionality between two browsers.
patientAppPages is one page object for the patient chat.
clinicPages is another page object from the practitioner PoV.
PatientAppPages can be controlled by adding "page" fixture in my test like this: it("should work ", async ({page, clinicPages, patientAppPages }) => { await page.goto("https://patientApp.com") })
But there is no way for me to navigate to the clinicPages url or to control that instance of the page.
It simply creates a blank page.
I do not want to navigate to the url in the fixture. I need the page instance for clinicPages for my other functions.
Is this possible?
The text was updated successfully, but these errors were encountered:
You can store the page in the wrapper classes and then expose it to the tests:
// Assuming one of the POM classes defined like this:classClinicPages{page: Page;constructor(page: Page){this.page=page;}asyncgotoLandingPage(){awaitthis.page.goto('https://clilic-url');}};// In the test you can do something like this:it("should work ",async({clinicPages, patientAppPages })=>{awaitpatientAppPages.page.goto("https://patientApp.com");awaitclinicPages.page.goto('https://clilic-url');// or alternatively using POM method:awaitclinicPages.gotoLandingPage();})
Hello!
See the attached picture for my code.
I need to automate chat functionality between two browsers.
patientAppPages is one page object for the patient chat.
clinicPages is another page object from the practitioner PoV.
PatientAppPages can be controlled by adding "page" fixture in my test like this:
it("should work ", async ({page, clinicPages, patientAppPages }) => { await page.goto("https://patientApp.com") })
But there is no way for me to navigate to the clinicPages url or to control that instance of the page.
It simply creates a blank page.
I do not want to navigate to the url in the fixture. I need the page instance for clinicPages for my other functions.
Is this possible?
The text was updated successfully, but these errors were encountered: