I am using Selenium-Java (version: 4.3.0)
My web application has a simple dropdown with some values in it.
I am using below command to select the value in the dropdown
driver.findElement(By.id("phoneCountryCode")).sendKeys("USA");
I am running my test on Windows Chrome browser, Samsung Galaxy S10 (mobile device) with Samsung browser. The dropdown selection works perfectly fine
However, the same command driver.findElement(By.id("phoneCountryCode")).sendKeys("USA");
does not wotk with iPhone 11 (mobile device) with OS version 15.
It does not throw any error at line driver.findElement(By.id("phoneCountryCode")).sendKeys("USA");
It does nothing when this line is executed and USA
does not get selected in the dropdown. The command driver.findElement(By.id("phoneCountryCode"))
works fine. But, the command sendKeys("USA");
does not do anything.
The reason I am using sendKeys function and not using Select class because, on IOS mobile devices Select class is not recognised.
Can someone please help me in this regard why sendkeys is not working on IOS mobile device? Or if there is any alternative way to select the value from the dropdown apart from using Select class in selenium?