Skip to content

openqa.selenium.UnsupportedCommandException: Method has not yet been implemented at XCUITestDriver.executeCommand #2268

@vnuta9

Description

@vnuta9

@KazuCocoa @jlipps
Similar to issue#1692, is occurring for me. For our MobileWeb application automation, I am trying to open a new window and switch in to that using the recent Selenium 4.0 methods:

Environment:

  • Appium Server: 2.11.5
  • JDK 21.0.4
  • Appium-java client: 9.3
  • Selenium-java client: 4.25
  • Desktop MacOS Sequoia: 15.3
  • Mobile platform iOS 18.3 on iPhone: 11

Code To Reproduce:

// driver below would be either **AppiumDriver**, or one of it's subclasses like **AndroidDriver**, **IOSDriver** based on the platform
driver =  getDriver4MobileWeb(platform, browser, deviceName) ;
stack.add(driver.getWindowHandle());
//Opens a new window and switches to new window
        **driver.switchTo().newWindow**(WindowType.WINDOW);// ----> Error(given below is thrown) here<---
        stack.add(driver.getWindowHandle());
        System.out.println("window handles = "+driver.getWindowHandles()+",stack items="+stack.toString());
		//change the context to WEBVIEW (more so for iOS, as it is default for Android) 
    	changeDriverContextToWeb();

Exception Stack:

UnsupportedCommand {"value":{"error":"unknown method","message":"Method has not yet been implemented","stacktrace":"NotYetImplementedError: Method has not yet been implemented\n    at XCUITestDriver.executeCommand (/Users/venkatanutalapati/.nvm/versions/node/v20.16.0/lib/node_modules/appium/node_modules/@appium/base-driver/lib/basedriver/driver.ts:102:13)\n    at processTicksAndRejections (node:internal/process/task_queues:95:5)\n    at XCUITestDriver.executeCommand (/Users/venkatanutalapati/.appium/node_modules/appium-xcuitest-driver/lib/driver.js:1044:12)\n    at defaultBehavior (/Users/venkatanutalapati/.nvm/versions/node/v20.16.0/lib/node_modules/appium/lib/appium.js:1135:14)\n    at AppiumDriver.executeWrappedCommand (/Users/venkatanutalapati/.nvm/versions/node/v20.16.0/lib/node_modules/appium/lib/appium.js:1241:16)\n    at AppiumDriver.executeCommand (/Users/venkatanutalapati/.nvm/versions/node/v20.16.0/lib/node_modules/appium/lib/appium.js:1147:17)\n    at asyncHandler (/Users/venkatanutalapati/.nvm/versions/node/v20.16.0/lib/node_modules/appium/node_modules/@appium/base-driver/lib/protocol/protocol.js:387:19)"}}
Command duration or timeout: 17 milliseconds
Build info: version: '4.28.1', revision: '73f5ad48a2'
System info: os.name: 'Mac OS X', os.arch: 'aarch64', os.version: '15.3', java.version: '21.0.6'
Driver info: io.appium.java_client.ios.IOSDriver
Command: [80ba2ffa-621a-4699-9664-9b568a97062f, newWindow {type=window}]
Capabilities {appium:autoAcceptAlerts: true, appium:autoWebview: true, appium:automationName: XCUITest, appium:databaseEnabled: false, appium:deviceName: Venkata Nutalapati's iPhone, appium:includeSafariInWebviews: true, appium:javascriptEnabled: true, appium:locationContextEnabled: false, appium:networkConnectionEnabled: false, appium:platformVersion: 18.3, appium:takesScreenshot: true, appium:udid: 00008030-000159EA0E60402E, appium:webStorageEnabled: false, appium:webviewConnectTimeout: 50000, browserName: Safari, platformName: IOS}
Session ID: 80ba2ffa-621a-4699-9664-9b568a97062f�[m

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions