selenium – How to switch to specific iframe using automation in android and iOS application which is not WebViews


I’m trying to automate a scenario where I can switch to desired iframe and execute a console command, this is working fine in websites only, I need to do the same for android and iOS too, things that I have tried and working which is working fine in web are :

Automation tool that i’m using is Katalon Studio

    def switchIframe(String iframe_id) {
        if(platform.equals('web')) {
            WebDriver webDriver = DriverFactory.getWebDriver()

...Calling above keyword in my script is ----> actions.switchIframetest('in.juspay.flyer')

after switching to specific iframe I’m executing a command ‘state()’

I need to perform same in android and iOS can anyone please give me a solution

Note : The application that I’m using in android and iOS is not WebView application.