C# client libraries are not part of 10.9.82 release?

Hi Team,

C# client libraries are not part of 10.9.82 release ? Because i could see only Java clients exist at C:\Program Files (x86)\Experitest\AppiumStudio\clients\appium directory

Thanks,
Saravanan

Hi Saravanan,

Appium Studio 10.9 now makes use of Appium Server’s default client libraries.

You can simply download the desired client (C#) and configure it in your Visual Studio project by adding it in the using section.

Thanks Buddy! Let me try this out! :slight_smile:

By the way, how to run tests in Parallel with C# NUnit ? For Java, i was using TestNG’s parallel attribute, but am not sure about NUnit

Thanks,
Saravanan

Hi Saravanan

By default, NUnit did not support running parallel test, but the devs have introduced this option in version 3.0.

You can find more information in their docs.

Thanks Nivi! Let me try [Parallelizable(ParallelScope.Fixtures)] for each TestFixture

Hi Nivi,

In C# + Appium Studio 10.9.82 - we are facing {"invalid session id (Invalid session ID) "} issue while executing our test, even though we defined newCommandTimeout capability.

May you have any thoughts on this please

Thanks,
Saravanan

Hi Saravanan,

I wasn’t able to recreate the issue on my end when running a sample test.
I used visual studio, NUnit, and ran the test on iPhone 6.

Can you please share the test script with us so we can have a closer look?

Thanks Nivi!

I’m using Andorid 7.0 | Real Device | Visual Studio | and below is my code to initialize driver object

AndroidDriver driver;
DesiredCapabilities capability = new DesiredCapabilities();

capability.SetCapability(“newCommandTimeout”, Constants.Paths.newCommandTimeout);
capability.SetCapability(“deviceName”, Constants.DeviceName);
capability.SetCapability(“platformName”, Constants.PlatformName);
capability.SetCapability(“platformVersion”, Constants.PlatformVersion);
capability.SetCapability(“automationName”, Constants.AutomationName);
capability.SetCapability(“appPackage”, Constants.PackageName);
capability.SetCapability(“fullReset”, false);
capability.SetCapability(“noReset”, true);
capability.SetCapability(“autoWebviewTimeout”, 180000);
capability.SetCapability(“unicodeKeyboard”, true);
capability.SetCapability(“nativeWebScreenshot”, true);
capability.SetCapability(“app”, Directory.GetParent(AppDomain.CurrentDomain.BaseDirectory).Parent.Parent.Parent.FullName + “/sdk/apk/” + Constants.AppName + “.apk”);
capability.SetCapability(“appActivity”, Constants.Activities.AcceptandLaunchActivityName);

TimeSpan timeSpan = TimeSpan.FromMinutes(20);
driver = new AndroidDriver(new Uri(“http://localhost:” + port + “/wd/hub”), capability, timeSpan);

Test to Capture Screenshot
string screenName = Constants.Paths.ScreenShotsPath + DateTime.Now.ToString(“MMddyy”) + “\” + TestContext.CurrentContext.Test.MethodName + “\” + screenshotname + “.jpg”;
ITakesScreenshot sdriver = driver as ITakesScreenshot;
Screenshot screenshot = sdriver.GetScreenshot();
screenshot.SaveAsFile(screenName, System.Drawing.Imaging.ImageFormat.Jpeg);

Thanks,
Saravanan

Hi Saravanan

For starters, try to initialize your Android Driver liks so:
"AndroidDriver<MobileElement> driver"
" driver = new AndroidDriver<MobileElement>(new Uri("http://localhost:" + port + "/wd/hub"), capability, timeSpan"

See if that solves your issue.

Thanks Nivi!

I just realized was using newCommandTimeout as string instead of int. After changing that into int, its working as expected :slight_smile: