appium-boneyard/selenium-objective-c

setFrame by index

Closed this issue · 0 comments

if i have something like

...

<iframe> ... <iframe> ...

how can i use setFrame method with index param to switch to that frame

e.g. [webDriver setFrame:1]; // first frame is selected

if i do it like that i keep getting this error:

debug: Request received with params: {"name":"1"}
TypeError: Cannot read property 'ELEMENT' of undefined
at IOS.frame (/Applications/Appium.app/Contents/Resources/node_modules/appium/app/ios.js:1237:23)
at exports.frame (/Applications/Appium.app/Contents/Resources/node_modules/appium/app/controller.js:596:14)
at callbacks (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:161:37)
at param (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:135:11)
at param (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:132:11)
at pass (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:142:5)
at nextRoute (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:100:7)
at callbacks (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:164:11)
at exports.sessionBeforeFilter (/Applications/Appium.app/Contents/Resources/node_modules/appium/app/controller.js:141:5)
at callbacks (/Applications/Appium.app/Contents/Resources/node_modules/appium/node_modules/express/lib/router/index.js:161:37)