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
Related
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");
}}
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
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.
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
Hiii....
I am using opencv-2.4.11 with microsoft visual studio 12 express edition with fake key and windows 8.1.
I have no problem in compiling my code but when I build my project it is showing following error
" LINK : fatal error LNK1181: cannot open input file 'opencv_calib3d2411d.obj' ".
I have added all the librarys,paths and input correctly, I am still facing the problem. Please help me resolve the problem.
Thank You
I found the answer
The input files are correct but you need to give the full path in Linker->Input->Additional Dependencies. i will show you how.
C:\opencv\build\x64\vc12\lib\opencv_calib3d2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_contrib2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_core2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_features2d2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_flann2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_gpu2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_highgui2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_imgproc2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_legacy2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ml2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_objdetect2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ocl2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_photo2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_stitching2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_superres2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_ts2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_video2411d.lib
C:\opencv\build\x64\vc12\lib\opencv_videostab2411d.lib
Also in Linker->General->Use Library Dependency Input, Click on yes
This should certainly help.