-
-
Notifications
You must be signed in to change notification settings - Fork 737
within()/I.switchTo() fails in specific case: Either name or url matcher should be specified #3880
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Comments
The simplistic scenario is (unfortunately can be reproduced on our product's page only). Scenario("Teacher: Verify the kit's content", () => {
I.click(iPlannerPage.kitView.kitContent);
within(
{
frame: "//iframe",
},
() => { // No need to have any action here to reproduce the issue }
);
});
If you use The iframe source of the page is <iframe style="height: 251.826px; border-width: 0px;" src="blob:http://localhost:19006/92ea7cf1-0b62-4234-a2a2-239124b3d231"></iframe> |
I can reproduce even with Playwright 1.35.1 I tried to replace I.switchTo("(//iframe)[last()]")
// actions
I.switchTo() but I'm getting the same error
|
May you try with any other test websites to see if your issue persists? |
I noticed one thing: When I use a simple "iframe" then a scenario with
When I test it in 3.5.3, everything works fine |
Just to add some information to around this error. I am seeing the same error on existing code using We were advised by @DavertMik to use
|
I'm able to reproduce the issue "Either name or url matcher should be specified" with Follow this: Feature("My");
const { I } = inject();
Scenario("test something", () => {
I.amOnPage("https://www.geekdashboard.com/tools/iframe-tester/");
I.fillField(locate("input").withAttr({ type: "url" }), "codecept.io");
I.click(locate("input").withAttr({ type: "submit" }));
I.wait(5);
I.switchTo("iframe#iframe-content");
}); config: export const config: CodeceptJS.MainConfig = {
tests: "./*_test.ts",
output: "./output",
helpers: {
Playwright: {
browser: "chromium",
url: "http://localhost",
show: true,
},
},
name: "my",
}; output:
|
I created a new issue for it: #3891 |
It works well in 3.5.3
It's related to #3846, CC: @kobenguyent
In 3.5.4 I'm getting
ERROR locator.toLowerCase is not a function
and in 3.5.5 I'm gettingEither name or url matcher should be specified
What are you trying to achieve?
The scenario should pass. Unfortunately I don't have a simplistic case, so I used a scenario from our production tests.
What do you get instead?
Details
The text was updated successfully, but these errors were encountered: