-1
Requirement : I am working of a project for IOS mobile automation testing, here my developer created the dropdown by using Telerik RadComboBox for that i need to select the value from the dropdown.
Problem: Values from that dropdown has no specific locators like Xpath or ID is present. I can able to click the dropdown button and values from the dropdown is visible, But cant access the values.
Using C# Appium with NUnit framework.
I Tried to handle the dropdown by click(), Sendkeys(), nothing is working also i Tried tap action like tap by coordinates still it is not tap the element which i want, it tap’s backside of the dropdown.
Used waited conditions and RadComboBox(), nothing is select the item in dropdown.
Here are some sample code:
using OpenQA.Selenium.Appium;
using OpenQA.Selenium.Appium.iOS;
class Program {
static void Main(string[] args) {
AppiumOptions options = new AppiumOptions();
options.AddAdditionalCapability("platformName", "iOS");
options.AddAdditionalCapability("platformVersion","14.5");
options.AddAdditionalCapability("deviceName", "iPhone 11");
options.AddAdditionalCapability("app", "path/to/your/app");
iOSDriver<IOSElement> driver = new IOSDriver<IOSElement>(new Uri("http://localhost:4723/wd/hub"), options);
// Find the RadComboBox element
var comboBox = driver.FindElement(By.Id("XCUIElementTypeStaticText"));
// Click on the RadComboBox element to open the dropdown list
comboBox.Click();
// Find the item you want to select in the dropdown list
var itemToSelect = driver.FindElement(By.Id("apple"));//Here There is no locator for the items visible under dropdown
// Click on the item element to select it`enter code here`
itemToSelect.Click();// So not able to click
}
}