An error occurred while running .click() command on <input[type="submit"]>: from target frame detached in NightwatchJS
Asked 07 September, 2021
Viewed 1.1K times
  • 54
Votes

I'm getting this error in Nightwatch when trying to click submit in an iframe

this is my code:

.perform(() => {
    client.getAttribute('#myiframe', 'id', result => {
        client
            .frame(result.value)
            .setValue('input[name="username"]', 'user')
            .setValue('input[name="password"]', 'password)
            .click('input[type="submit"]')
    })
})

it's sporadically happening too

anyway I can fix this?

I'm using latest version of nightwatch (^1.3.5) and chromedriver (^83.0.0)

0 Answer