Appium automation in Windows - appium

So I've been trying to get my desired capabilities for a while and it's not working with the error of "failed to create session.
An unknown server-side error occurred while processing the command. Original error: Could not find a driver for platformName 'android'.
Please check your desired capabilities", I've tried a few other settings but nothing is working help me
{
"platformName":"andriod",
"appium:platformVersion": "11.0",
"appium:deviceName":"Saint", "appium:automationName":"capability",
"appium:app": "path"
}

Not much help with what you have provided , but session is not getting created can have multiple scenarios.
Check your Appium server is running.
Define your driver correctly either appium/androiddriver/iOSdriver..
Your capabilities list are not full , so please try to paste full error since it will be helpful.
Just replace these capabilities from your code with these name/caps
DesiredCapabilities desiredCapabilities = new DesiredCapabilities();
desiredCapabilities.setCapability("udid", udid);
desiredCapabilities.setCapability("platformVersion", platformVersion);
desiredCapabilities.setCapability("platformName", "Android");
desiredCapabilities.setCapability("appActivity", "<Your App activity>");
desiredCapabilities.setCapability("automationName","UiAutomator2");
}}

Related

Appium couldn't install the app to real device

I have updated appium recently, since then I can't get it to work.
Followings are the errors shows in the appium log"
Error was thrown during the installation process. TypeError
TypeError [ERR_INVALID_ARG_TYPE]: The "path" argument must be of type string. Received type undefined
Error: Could not install app: 'The "path" argument must be of type
string. Received type undefined'
at IOSDeploy.install
(/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/ios-deploy.js:41:13)
When trying to open the inspector session, it only opens the simulator and the inspector window keeps on loading.
DesiredCapabilities:
DesiredCapabilities des = new DesiredCapabilities();
des.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone XS Max");
des.setCapability(CapabilityType.PLATFORM_NAME, "IOS");
des.setCapability("noReset", true);
des.setCapability("fullReset", false);
des.setCapability(MobileCapabilityType.UDID, "00008020-001D650021D8002E");
des.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);
des.setCapability(MobileCapabilityType.PLATFORM_VERSION, "13.0");
des.setCapability(MobileCapabilityType.APP, "/Users/isururodrigo/Library/Developer/Xcode/DerivedData"
+ "/VisitSingapore-aheghxbadxxzuzardfddwixazzfm/Build/Products/Debug-Staging-iphoneos/VS-Staging.app");
try {
driver = new IOSDriver<IOSElement>(new URL("http://127.0.0.1:4723/wd/hub"), des);
} catch (MalformedURLException e) {
e.printStackTrace();
System.out.println(e.getMessage());
}
driver.setLogLevel(Level.INFO);
Appium v1.15.0-1
Node v10.16.3
xcode v11.1
iOS v13.1.2
I managed to solve this issue by updating the v1.15.1, if anyone of you facing this issue update to the latest which is available in this link.
New pre-release is out for v1.15.1: https://github.com/appium/appium-desktop/releases/tag/v1.15.1

Instantiating Appium IOS/Android driver

I'm using appium-dotnet-driver v4.0.0.4 beta of the appium nuget package (but I have downgraded to the previous versions too and I'm getting the same issue)
So I've never used it before, therefore not entirely sure how it should work. Currently I'm doing this:
private static AppiumDriver<AppiumWebElement> mobileDriver;
AppiumOptions opt = new AppiumOptions();
opt.AddAdditionalCapability("autoWebview", true);
switch (platform.ToLower())
{
case "ios":
{
foreach (var cap in MobileSettingsFileConstants.iosCapabilities)
{
opt.AddAdditionalCapability(cap.Key, cap.Value);
}
mobileDriver = new IOSDriver<AppiumWebElement>(GridUri, opt);
break;
}
When ever it tries to add an additional capability to Appium Options I get an exception : Exception thrown: 'System.MissingMethodException' in appium-dotnet-driver.dll, Additional information: Method not found: 'Void OpenQA.Selenium.Remote.DesiredCapabilities.set_Item
I've had a look on the appium forum and they said this was an issue. Can someone share their experience with this please?
I found out I had to be at the latest version on Selenium on both test framework and test solution.
Simple answer to a mind boggling question.

Android driver issue

I am new to mobile automation with appium.i am getting error message "The constructor AndriodDriver (Capabilities) refers to the missing type Capabilities ".
driver=new AndriodDriver (new URL("127.0.0.1:4723"),
Capabilities);
Go through the below links. Those might be help full
http://toolsqa.com/mobile-automation/appium/download-and-install-nodejs/
http://www.software-testing-tutorials-automation.com/2015/09/appium-tutorials.html

Appium Android SendKey not working

I am trying to automate my android application test on testdroid server using Appium Java client. I am getting exception that unable to locate element while using element.sendKeys on AndroidElement.
AndroidElement element = wd.findElement(By.xpath("//android.widget.LinearLayout[1]"
+ "/android.widget.FrameLayout[1]/android.widget.RelativeLayout[1]"
+ "/android.widget.RelativeLayout[1]/android.widget.LinearLayout[1]"
+ "/android.widget.EditText[1]"));
element.click();
wd.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS);
element.sendKeys("Hello World");
In above code element.sendKeys throws exception
An element could not be located
Looks like it is "hinted text issue" of sendKey but not sure.
Please suggest me solution.
For android you should set capability "unicodeKeyboard" to "true". Also don't forget to reset
capabilities.setCapability("unicodeKeyboard", "true");
capabilities.setCapability("resetKeyboard", "true");
Refer http://appium.io/slate/en/v1.3.4/?ruby#android-only

dotnetopenauth samples "Attempt by method 'DotNetOpenAuth.OAuth2.WebServerClient ..."

I've just been spending hours on an issue that some others have reported to experience too.
The Sample.Oauth2.OAuthClient projet sample does not work for me.
Let me explain in details:
I got the latest version of dotnetopenauth from github (december 12th)
I ensured to "unblock" the zip before extracting all files.
I opened the solution with VS2012 (under Win7)
When starting the
Sample.Oauth2.OAuthClient project,
the overall build process succeed.
The website is started.
When calling
Sign in with Facebook (OAuth 2.0)
I get
Attempt by method
'DotNetOpenAuth.OAuth2.WebServerClient+d__3.MoveNext()'
to access method
'System.Collections.Generic.List`1..ctor()' failed.
Line 106: // verifiable for the same user/session.
Line 107: // If the host is implementing the authorization tracker
though, they're handling this protection themselves.
Line 108: var cookies = new List();
Line 109: if (this.AuthorizationTracker
== null) {
Line 110: string xsrfKey =
MessagingUtilities.GetNonCryptoRandomDataAsBase64(16, useWeb64: true);
That the provided code is not able to access "System.Collections.Generic.List" bewilders me...
I tried the following :
adding
<system.web>
<securityPolicy>
<trustLevel name="Full" policyFile="internal"/>
</securityPolicy>
to web.config.
Note that checking just before the line the "CurrentTrustLevel" results in "Unrestricted".
I tried to publish to local IIS 7,
tried running the pool under "administrator"
and finally
I tried with VS2013 on another, "clean" installation of Win7,
All attempts lead to the same result ...
It seems that the errors comes from some System.Net Dlls provided with the samples : they cannot be run by asp.net for security reasons (?)
Any idea ?

Resources