Login to System after entering credentails
Clicks on the url to open a new Window.
The new window gets closed the moment it opens.
Got a work Around from the nelow Id
https://github.com/DevExpress/testcafe/issues/6926
Again clicked on the same link.
The Test cafe fails to switch to new window and the window keeps on loading
What is the Current behavior?
The new window keeps on loading. but if you do it manually , the new window gets opened in 5 seconds.
What is the Expected behavior?
It should switch to new window and get the url , the system should match with expected url
What is the public URL of the test page? (attach your complete example)
test(1648 Verify the content of 'Learn more' menu - BH center, async t => {
// Display Child Care benefits (including center)
const getUrl = await t.eval(() => window.location);
await t.expect(getUrl.href).eql(`https://mybhtest.bhdts.com/home`, { timeout: 120000 })
await t.expect(Selector('#dashboard_walkthrough').filterVisible().exists).ok({ timeout: 120000 })
// Find a card and open the 'Learn more' menu
await t.click(Selector('app-recommended-centers').find('button.header__button'))
const card: Selector = Selector('app-recommended-centers').find('div.centers__wrapper>app-scroll-wrapper div.wrapper__container').find('app-center-card').find('.center-card__center-name').withText('Bright Horizons at Cranberry').parent('app-center-card').nth(0);
await t.click(card.find('app-link span').withExactText('Learn more'));
// Verify the content of the menu
await t.click(Selector('mat-sidenav#rightsidenav').find('section.sidenav__section').nth(0).find('section.tile-accreditation').withText(/Health and [Ss]afety is [Oo]ur [Tt]op [Pp]riority/).find('a').withExactText('Read more'));
await t.click(Selector('mat-sidenav#rightsidenav').find('section.sidenav__section').nth(0).find('section.tile-accreditation').withText(/Health and [Ss]afety is [Oo]ur [Tt]op [Pp]riority/).find('a').withExactText('Read more'));
await t.expect(getUrl.href).eql(`https://www.brighthorizons.com/health-safety`, 'Redirected to the wrong URL.')
await t.closeWindow();
If you are not getting the center as "Bright Horizons at Cranberry" ,
click on account >> profile
Under Zip Code : 16066
click on the save button.
Click on Life Stages.
check if early years is checked and after making chnages, click on save button.
click on Intrerest.
check if Caring Responsibility is checked and after making chnages, click on save button.
This enables the system rto get the recommended BH center in the System.
We appreciate you taking the time to share information about this issue. We reproduced the bug and added this ticket to our internal task queue. We'll update this thread once we have news.
What is your Scenario?
Login to System after entering credentails Clicks on the url to open a new Window. The new window gets closed the moment it opens. Got a work Around from the nelow Id https://github.com/DevExpress/testcafe/issues/6926 Again clicked on the same link. The Test cafe fails to switch to new window and the window keeps on loading
What is the Current behavior?
The new window keeps on loading. but if you do it manually , the new window gets opened in 5 seconds.
What is the Expected behavior?
It should switch to new window and get the url , the system should match with expected url
What is the public URL of the test page? (attach your complete example)
https://mybhtest.bhdts.com/
What is your TestCafe test code?
import { Selector, } from 'testcafe';
fixture
Center Finder test cases
.beforeEach(async t => { await t.maximizeWindow(); await t.navigateTo('https://mybhtest.bhdts.com/'); await t.expect(Selector('section.hero').filterVisible().exists).ok('Landing Page has not been displayed.', { timeout: 60000 }); await t.wait(4000) await t.click(Selector('div#onetrust-banner-sdk').find('button#onetrust-accept-btn-handler')); await t.click(Selector('header.header-container').find('button>span').withText(/Log [Ii]n/)); await t.click(Selector('div#onetrust-banner-sdk').find('button#onetrust-accept-btn-handler')); await t.typeText(Selector('bh-employer-search').find('#employer'), "Roche") await t.expect(Selector('div[role="listbox"]').filterVisible().exists).ok({ timeout: 20000 }) await t.click(Selector('div[role="listbox"]').find('mat-option').withExactText("Roche")) await t.click(Selector('bh-employer-search').find('button[type="submit"]')) await t.typeText(Selector('bh-credentials').find('#username'), "testroche") await t.typeText(Selector('bh-credentials').find('#current-password'), "User123BH") await t.click(Selector('bh-credentials').find('button').withAttribute('type', 'submit'));})
test(
1648 Verify the content of 'Learn more' menu - BH center
, async t => { // Display Child Care benefits (including center) const getUrl = await t.eval(() => window.location);}).meta('testType', 'common');
Your complete configuration file
No response
Your complete test report
1) AssertionError: Redirected to the wrong URL.: expected 'https://mybhtest.bhdts.com/home' to deeply equal 'https://www.brighthorizons.com/health-safety'
Screenshots
No response
Steps to Reproduce
1.launch "https://mybhtest.bhdts.com/". 2.Click on the accept cookies 3.click on the Login In Button
TestCafe version
3.6.5
Node.js version
v20.12.0
Command-line arguments
npx testcafe chrome .\tests\Functional\centers.ts --disable-native-automation
Browser name(s) and version(s)
chrome
Platform(s) and version(s)
Windows
Other
If you are not getting the center as "Bright Horizons at Cranberry" , click on account >> profile Under Zip Code : 16066 click on the save button. Click on Life Stages. check if early years is checked and after making chnages, click on save button. click on Intrerest. check if Caring Responsibility is checked and after making chnages, click on save button.
This enables the system rto get the recommended BH center in the System.