Selecting web element with id in appium test started using AndroidDriver

I’m new to Appium and testing as a whole. I used Android driver to test an app in android.

I can handle all clicks and typing in the app. But the issue arises while using the OAuth service to log in the app.

I use the following Driver client. appium dotnet driver

The login service opens in a separate chrome browser. I have to type text in an input element inside the web page.

I use the following code. On debugging page resource only has the android elements of the chrome browser and nothing of the web content.

var appiumDriver = new AndroidDriver<AndroidElement>(driverUri, appiumOptions);

[Test()]
[Order(1)]
public async Task TestLogin()
{
    try
    {
        appiumDriver.FindElementByAccessibilityId("Login").Click();
        await Task.Delay(3000);
        var source = appiumDriver.PageSource;
        var element = appiumDriver.FindElementById("login-email");
    }
    catch (NoSuchElementException ex)
    {
    }
}

Can anyone suggest how to proceed with this problem? This also has to be done in iOS, I guess both can be handled the same way… Thanks in advance.

Same was asked in SO too. SO link