Hi Crosswalk-Project Team,
Thank you for a wonderful description of "CrossWalk Webdriver" at the link https://github.com/crosswalk-project/crosswalk-website/wiki/Crosswalk-WebDriver. To inform you, its really performance booster!!
Moving ahead, I have concern and would request your kind suggestion/solution.
I have a Hybrid application, and using cordova we are generating the apk for the Android platform. (by the command, cordova platform add android) Once the APK is getting generated via cordova, I am further developing Automation test cases in C# via Visual Studio and taking the Automation server as Appium to launch this APK and start debugging.
After setting the Appium capabilities, I am passing it as one of the parameters for calling the Selenium Webdriver(code below), I am not able to get the main Window handler!!
During the first phase, the apk which did not had Cross walk implemented, we were getting the handle(for windowhandler - highlighted text). But post crosswalk implementation(cordova-plugin-crosswalk-webview) into our Project(for better performance), the apk is not giving the handle.
Below is the piece of code for reference:
public class AndroidDriverExtension : DriverExtension { public AndroidDriverExtension(AndroidAppConfig appConfig) { this.driver = new RemoteWebDriver( new Uri(appConfig.ServerAddress), CapabilitiesForAppiumServer(appConfig.APKPath, Constant.MachineName), Constant.INIT_TIMEOUT_SEC); this.mainWindowHandler = this.driver.CurrentWindowHandle; }
/// <summary> /// Get capabilities of appium for run android test on device /// </summary> /// <returns></returns> private DesiredCapabilities CapabilitiesForAppiumServer(string apkPath, string deviceName) { //Set up app capabilities DesiredCapabilities capabilities = new DesiredCapabilities(); capabilities.SetCapability("deviceName", deviceName); capabilities.SetCapability("platformName", "Android"); capabilities.SetCapability("autoWebview", "true"); capabilities.SetCapability("apppackage", "com.test.testapp"); capabilities.SetCapability("appActivity", "com.test.testapp.MyApp"); capabilities.SetCapability("app", apkPath); return capabilities; }
Log snapshots for reference:
- CurrentWindowHandle '((MyAppFramework.DriverExtension)(this)).CurrentWindowHandle' threw an exception of type 'System.NullReferenceException' string {System.NullReferenceException}
- CurrentWindowHandle '((MyAppFramework.DriverExtension)(this)).CurrentWindowHandle' threw an exception of type 'System.NotImplementedException' string {System.NotImplementedException}
- Message "Not yet implemented. Please help us:
http://appium.io/get-involved.html" Please let me know if you need some more details. Your help would be greatly appreciated!!
Thanks & Regards, Saurabh Nigam India
The contents of this e-mail and any attachment(s) are confidential and intended for the named recipient(s) only. ---------------------------------------------------------------------------------------------------------------------------------------------------- |
_______________________________________________ Crosswalk-dev mailing list Crosswalk-dev@lists.crosswalk-project.org https://lists.crosswalk-project.org/mailman/listinfo/crosswalk-dev