I'm trying to use browser.switchTo().frame(0)
method in element.flood.io to switch between iFrames on a page. There are two iframes - xpath locations are //body[1]/form[3]/div[5]/iframe[1] and //body[1]/form[3]/div[2]/iframe[1]
I cant seem to interact with either frame on the page. So far I've tried :
step('3. Switch frame', async browser => {
await browser.wait.Until.ableToSwitchToFrame()
await browser.switchTo().frame(0)
I've tried using the xpath too.
step('3. Switch frame', async browser => {
let iframe = await browser.findElement(By.xpath('//body[1]/form[3]/div[2]/iframe[1]'))
let newbrowser = await browser.swicthto().frame(iframe)
This link is the which should be helpful but I do not find it to be:
You can use:
https://element.flood.io/docs/api/waiters#untilabletoswitchtoframeframe