I attempted to utilize the following capabilities
{
maxInstances: 1,
browserName: '',
appiumVersion: '1.18.2',
platformName: 'android',
platformVersion: '10.0',
deviceName: 'device',
webviewConnectTimeout: '90000',
chromeOptions: {args: ['--windowTypes=webview']},
safariLogAllCommunication: true,
enableWebviewDetailsCollection: true,
ensureWebviewsHavePages: true,
showChromedriverLog: true,
app: './android/app/build/outputs/apk/',
noReset: true,
autoWebview: true,
}
However, I am still unable to retrieve the webview URL. Below is an excerpt from my code snippet
let contexts = driver.getContexts();
console.log(contexts);
driver.switchContext('WEBVIEW_be.belgacom.hello');
console.log(driver.getPageSource());
console.log(driver.getUrl());