appium: iOS - Java: [XCTestDriver managerProxy]: unrecognized selector sent to instance

The problem

XCUIElementTypeKeyboard is found however, the tests are unable to type text into XCUIElementTypeTextField with “setValue()” or “sendKeys()”.

Test is finding the text field, reading it’s default value, and able to click into the text field.

Environment

  • Appium version (or git revision) that exhibits the issue: 1.6.3
  • Desktop OS/version used to run Appium: OSX 10.12.3
  • Node.js version (unless using Appium.app|exe): v5.0.0
  • Mobile platform/version under test: iOS 10.3
  • Real device or emulator/simulator: simulator
  • Appium CLI or Appium.app|exe: Appium CLI

Details

I haven’t ran this test since xCode 7.2 and iOS 9.1. I have just updated tests for XCUITest. Hopefully, I have everything configured properly. I followed the migration document. The Simulator option for “Connect Hardware Keyboard” is not selected. I have tried with IOSDriver<IOSElement>, WebDriver and AppiumDriver with the same results.

Link to Appium logs

https://gist.github.com/VTINFOJames/527c90f1660271abb27144bbaac3da45.js

Code To Reproduce Issue [ Good To Have ]

`public static void signInScreen(AppiumDriver driver) throws InterruptedException {

	/* Method variables */
	String page = "Account";
	String testDesc = "SignIn_Screen"; 
	String userName = ConnectAs.MOBILE.getId();
String password = ConnectAs.MOBILE.getPw();
   MobileElement element;
	
	/* Ensure the screen opened is the Sign In screen */
	/* Note: The Sign In screen's UIANavigationBar has the name "Account" */
	try {
		assertEquals(page, driver.findElement(By.className("XCUIElementTypeNavigationBar")).getAttribute("name"));
	} catch (NoSuchElementException e) {
		CONSOLE.info("\t**** This is not the screen for the "+testDesc+" test! ****\n\t\tWe will     try signing out of the app.\n");
		MobileUISignOut.signOut(driver);
	}
		
	/* Test the UserName UIATextField */
	element = driver.findElement(By.className("XCUIElementTypeTextField"));
	element.click();
	if (!element.getText().equals("Username")) {
		element.clear();
	}
	assertEquals("Username", element.getText());

if (driver.findElement(By.className(“XCUIElementTypeKeyboard”)).isEnabled()) { ((IOSElement) element).setValue(“test”); } }`

About this issue

  • Original URL
  • State: closed
  • Created 7 years ago
  • Comments: 50 (3 by maintainers)

Most upvoted comments

@mitamallik Simply updating WDA will not work, especially for such an old Appium version.

npm remove -g appium
npm install -g appium@1.6.4-beta

should do the job

Don’t know if this is helpful, but appium@1.6.4 (current release) fixed this issue for me. One thing to note though is that I’m using appium as a node module in my project i.e. npm install appium; not a global install.

My environment: OS: macOS 10.12.4 Xcode: 8.3.2 iOS Simulators: iphone 7 10.2 and 10.3 Node: 6.10.3

@DVeautour did you change the build target to 10.3? l am getting hung up on “Sending createSession command to WDA”. It is building WDA but not launching.

ah OK, now I see. You are trying to execute your test on iOS 10.3. In that version Apple did some major updates to their framework, so it’s not compatible with WDA snpashot included into Appium 1.6.3 Try to update Appium to 1.6.4-beta first and check whether it works then.