Exception : session not created (Failed to create session) (33)

Hi Team,

I’ve preinstalled the Application Under Test into my Android device, and trying to initialize the driver with below capabilities,

capability.SetCapability(MobileCapabilityType.Udid, DeviceName);
capability.SetCapability(MobileCapabilityType.NewCommandTimeout, 6000);
capability.SetCapability(AndroidMobileCapabilityType.AppPackage, Constants.PackageName);
capability.SetCapability(AndroidMobileCapabilityType.AppActivity, “.common.ui.WelcomeWizardActivity”);
capability.SetCapability(“instrumentApp”, true);
driver = new AndroidDriver(new Uri(“http://localhost:4723/wd/hub”), capability);

But ended with exception : Exception : session not created (Failed to create session) (33)

Could you please help us with this ?

Thanks,
Saravanan

Hi Saravanan,

In order for you to work with an instrumented android application, you must install the app in an instrumented mode
You can do this from the tool itself (UI)
By running the script with the “Install” and “Instrument” checkbox ticked

https://docs.experitest.com/display/AS/Instrumenting+Android+Applications

Awesome! thanks a lot Tom! It works :slight_smile: