Unable to identify the element
ritusenleo opened this issue · comments
In the application after clicking a button , a dialog box appear from where a button need to be clicked.
Unable to identify the floating dialog box.
Tried the followings, but nothing worked:
-
var dialog = driver.FindElementByName("XXXX");
dialog.FindElementByAccessibilityId("6").Click(); -
var appiumOptions = new AppiumOptions();
var _configurationDriver = new ConfigurationDriver();
appiumOptions.AddAdditionalCapability("app", "Root");
string appSetting = _configurationDriver.Configuration["winAppUri"];
var remoteAddress = new Uri(appSetting);
var driverRoot = new WindowsDriver(remoteAddress, appiumOptions);
var dialog = driverRoot.FindElementByName("XXXX");
dialog.FindElementByAccessibilityId("6").Click(); -
string topWindow = driverRoot.FindElementByName("XXXX").GetAttribute("NativeWindowHandle");
int MAWinHandleInt = Int32.Parse(topWindow);
string MAWinHandleHex = MAWinHandleInt.ToString();
Console.WriteLine("Success2");
var apOpt = new AppiumOptions();
apOpt.AddAdditionalCapability("appTopLevelWindow", MAWinHandleHex);
var drv = new WindowsDriver(remoteAddress, apOpt);
drv.FindElementByAccessibilityId("6").Click();
Any suggestion please
Your code is correct. I don't find any reason for it not to work. Can you get the page source.
Were you able to solve this? if not send a zoom call request.
it is solved after the fix.
But what did they fix.