Skip to content

SwitchTo frame giving error on firefox #2727

Answered by pawlakmaly
Mahad28 asked this question in Help Needed
Discussion options

You must be logged in to vote

I've created a custom command to switch between frames that works on both Chrome and Firefox:

module.exports = class changeFrame {
  
        return new Promise(async (resolve) => {
            await this.api.element(using, selector, (result) => {
                this.api.frame(result.value);
            })
            if (callback) {
                callback();
            }
            resolve(this.api);
        })
    }
}

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Mahad28
Comment options

Answer selected by Mahad28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
2 participants