Skip to content
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

chore: Remove validation of cypress iframe using id name #124

Merged
merged 1 commit into from
Jul 19, 2021
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions src/getCypressElementCoordinates.ts
Original file line number Diff line number Diff line change
Expand Up @@ -139,7 +139,7 @@ function getElementPositionXY(htmlElement: HTMLElement) {

/**
* Cypress Automation debugee is the whole tab.
* This function returns the element coordinates relative to the whole tab rot.
* This function returns the element coordinates relative to the whole tab root that can be used in CDP request.
* @param jqueryEl the element to introspect
*/
export function getCypressElementCoordinates(
Expand All @@ -150,7 +150,7 @@ export function getCypressElementCoordinates(
const htmlElement = jqueryEl.get(0);
const cypressAppFrame = window.parent.document.querySelector("iframe");

if (!cypressAppFrame || !cypressAppFrame.id.includes("Your App")) {
if (!cypressAppFrame) {
throw new Error(
"Can not find cypress application iframe, it looks like critical issue. Please rise an issue on GitHub."
);
Expand Down