I am performing web automation testing on the LambdaTest Real Device cloud. I am using Appium 2 with Java + Cucumber. A test with a drop-down element works perfectly fine on all devices, except iOS Tablet View (both Portrait + Landscape).
Please suggest a solution:
Hey @Punamhans
You can resolve the issue by adding an additional Appium Capability (only for iOS) named nativeWebTap .
This capability simulates native touch events and is particularly useful in scenarios where clicks are not intercepted, and more.
Hence, your capability will have one more entry named nativeWebTap, sample capabilities example below:
Map<String, Object> ltOptions = new HashMap<>();
ltOptions.put("nativeWebTap", true);
/* Start: All other capabilities remain unchanged */
ltOptions.put("video", true);
ltOptions.put("network", true);
ltOptions.put("build", "nativeWebTap");
ltOptions.put("name", "nativeWebTap");
ltOptions.put("visual", true);
ltOptions.put("w3c", true);
ltOptions.put("isRealMobile", true);
ltOptions.put("platformName", "ios");
ltOptions.put("platformVersion", "15");
ltOptions.put("deviceName", "iPad.*");
ltOptions.put("automationName", "XCUITest");
ltOptions.put("deviceOrientation", "landscape");
ltOptions.put("ensureWebviewsHavePages", true);
ltOptions.put("autoAcceptAlerts", true);
ltOptions.put("autoGrantPermissions", true);
/* End: All other capabilities remain unchanged */
/* Set the lt:options capability */
capabilities.setCapability("lt:options", ltOptions);
With this, the Menu Navigation and Click logic that you implement for Android also remains unchanged for iOS.