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

fix: frame command overlapping with subsequent NW commands. #4276

Merged
merged 1 commit into from
Oct 18, 2024

Conversation

garg3133
Copy link
Member

When the .frame() command is used with await (as shown below), the command promise resolves early before the command can even find the target frame element. Due to this, the subsequent Nightwatch commands start running parallelly with the .frame() command.

await browser.frame('frame_a_simple_iframe');
await browser.waitForElementVisible('.example');

This PR solves this issue by ensuring that the frame() command promise is only resolved once the command has completed its execution so that the subsequent commands only run after that.

Copy link

Status

  • ❌ No modified files found in the types directory.
    Please make sure to include types for any changes you have made. Thank you!.

@garg3133 garg3133 merged commit 785d52a into nightwatchjs:main Oct 18, 2024
15 of 17 checks passed
@garg3133 garg3133 deleted the fix-frame-command-overlapping branch October 18, 2024 12:07
@garg3133 garg3133 restored the fix-frame-command-overlapping branch October 18, 2024 17:59
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant