Giter VIP home page Giter VIP logo

dotnet-client's Introduction

appium-dotnet-client

Nuget (with prereleases) Build and deploy NuGet package NuGet Downloads

Build Status

Help Wanted

License

This driver is an extension of the Selenium C# client. It has all the functionalities of the regular driver, but add Appium-specific methods on top of this.

v5 Release Candidate

Appium server compatibility for v5.x

Important

In case you are using the latest beta client v5.x please be aware you will either have to upgrade your appium server to 2.x or add the base-path argument: appium --base-path=/wd/hub, due to a breaking change on the default server base path.
Regardless, moving to appium 2.x is highly recommended since appium 1.x is no longer maintained.
For more details about how to migrate to 2.x, see the following link : appium 2.x migrating

Deprecated Methods

Caution

  • MultiAction and TouchAction are deprecated. Please use W3C WebDriver actions or mobile: extensions.
  • LaunchApp, CloseApp, and reset are deprecated, please read each deprecation message as an alternative method.
  • The ReplaceValue method is deprecated and will be removed in future versions. Please use the following command extensions: 'mobile: replaceElementValue' instead.
  • The SetImmediateValue method is deprecated and will be removed in future versions. Please use 'SendKeys' instead.

Additional Information

W3C Actions: https://www.selenium.dev/documentation/webdriver/actions_api
App management: Please read issue #15807 for more details

Migration Guide to W3C actions

  using OpenQA.Selenium.Interactions;
  
  var touch = new PointerInputDevice(PointerKind.Touch, "finger");
  var sequence = new ActionSequence(touch);
  var move = touch.CreatePointerMove(elementToTouch, elementToTouch.Location.X, elementToTouch.Location.Y,TimeSpan.FromSeconds(1));
  var actionPress = touch.CreatePointerDown(MouseButton.Touch);
  var pause = touch.CreatePause(TimeSpan.FromMilliseconds(250));
  var actionRelease = touch.CreatePointerUp(MouseButton.Touch);
 
  sequence.AddAction(move);
  sequence.AddAction(actionPress);
  sequence.AddAction(pause);
  sequence.AddAction(actionRelease);
  
  var actions_seq = new List<ActionSequence>
  {
      sequence
  };
 
  _driver.PerformActions(actions_seq);

WinAppDriver Notice!

Warning

Because WinAppDriver has been abandoned by MS, running Appium dotnet-client 5.x with WAD will not work since it has not been updated to support the W3C protocol.
To run appium on Windows Applications, you will need to use appium-windows-driver which will act as a proxy to WAD. Examples of running Windows Applications with dotnet-client can be found here: windows Integration test 5.0.0
Regardless, feel free to open an issue on the WAD repository that will help get MS to open-source that project.

NuGet

NuGet Package:

Dependencies:

Note: we will NOT publish a signed version of this assembly since the dependencies we access through NuGet do not have a signed version - thus breaking the chain and causing us headaches. With that said, you are more than welcome to download the code and build a signed version yourself.

Usage

basics

  • You need to add the following namespace line: using OpenQA.Selenium.Appium;.
  • Use the AppiumDriver class/subclass to construct the driver. It works the same as the Selenium Webdriver, except that the ports are defaulted to Appium values, and the driver does not know how to start the Appium independently.
  • To use the Appium methods on Element, you need to specify the parameter of AppiumDriver or its subclasses.

Read Wiki

See samples here

Dev Build+Test

Xamarin/Mono

  • Open with Xamarin
  • Rebuild all
  • Run tests in test/specs

JetBrains Rider

  • Open with Rider
  • From the menu Build -> Rebuild Solution
  • Run tests in Appium.Net.Integration.Tests

Visual Studio

Nuget Deployment (for maintainers)

To Setup Nuget

  • Download Nuget exe.
  • Setup the Api Key (see here).
  • alias NuGet='mono <Nuget Path>/NuGet.exe'

To Release a New Version

  • update assemblyInfo.cs, RELEASE_NOTES.md, and appium-dotnet-driver.nuspec with the new version number and release details, then check it in
  • pull new code
  • Rebuild All with Release target.
  • NuGet pack appium-dotnet-driver.nuspec
  • NuGet push Appium.WebDriver.<version>.nupkg

dotnet-client's People

Contributors

astro03 avatar azure-pipelines[bot] avatar broetchenrackete36 avatar bryant1410 avatar cosminstirbu avatar dependabot[bot] avatar dor-bl avatar dpgraham avatar etadzeta avatar gravity-api avatar jimevans avatar jlipps avatar jonahss avatar kazucocoa avatar laolubenson avatar lyubomirstoimchev avatar manoj9788 avatar poindextrose avatar prolificcoder avatar pver avatar rajfidel avatar sebv avatar sergejkapusta avatar sparerd avatar srinivasantarget avatar stoneman avatar sttodorov avatar tikhomirovsergey avatar trbnb avatar troywalshprof avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dotnet-client's Issues

ITouchAction with multiple taps keeps moving location

Driver Version 1.4.0.2, Appium 1.4.0

For example, if x = 100 and y = 100, the following will result in tapping (100,100) then (200,200).

ITouchAction t = new TouchAction(driver)
            .Tap(x, y)
            .Wait(100)
            .Tap(x, y);
        t.Perform();

Member in AppiumDriver to tap at location X and Y

The driver should expose a member for tapping a location X and Y

Use Case: In an Android app, a user should be able to close the navigation drawer by tapping outside the drawer. When the drawer is opened, the only views that are accessible are the drawer itself and the action bar (the drawer can't be closed by tapping the action bar). Therefore, I can't use the method TouchActions.SingleTap(IWebElement) to tap outside the drawer.

Add Android input method methods (Appium 1.2)

Add methods to query and set the input method (IME) in Android (spec). Five methods are there:

  1. available engines: returns a list of engines available on the device
    • GET /wd/hub/session/:sessionId?/ime/available_engines
    • wd
  2. active engine: returns the currently active engine
    • GET /wd/hub/session/:sessionId?/ime/active_engine
    • wd
  3. is active: returns boolean, IME is active or not (on Android this is always true)
    • GET /wd/hub/session/:sessionId?/ime/activated
    • wd
  4. activate engine: takes the package and activity, and activates it
    • POST /wd/hub/session/:sessionId?/ime/activate
    • payload: { 'engine': 'com.android.inputmethod.latin/.LatinIME` }
    • wd
  5. deactivate engine: deactivates the currently active IME on the device
    • POST /wd/hub/session/:sessionId?/ime/deactivate
    • wd

By.Classname and FindElementByClassName() always look for css selector in native app causing invalid locator strategy

[FindsBy(How = How.ClassName, Using = "UIATableView")]
public override IWebElement foo{ get; protected set; }

and

driver.FindElementByClassName("UIATableView");

both cause:

responding to client with error: {"status":9,"value":{"message":"Invalid locator strategy: css selector","origValue":"Invalid locator strategy: css selector"},"sessionId":"9717df13-5a24-4de7-a22e-f1d63c847fde"}
info: <-- POST /wd/hub/session/9717df13-5a24-4de7-a22e-f1d63c847fde/element 500 0.591 ms - 177

after updating to the latest .net appium driver 1.2.0.5 the above issue occured

Readme outdated - AppiumDriver is abstract class

The README Example seems to be outdated. The class AppiumDriver is abstract.
The line from the example: "driver = new AppiumDriver(new Uri("http://127.0.0.1:4723/wd/hub"), capabilities); "

will not work anymore. You have to use AndroidDriver or IOSDriver to create a new driver instance.
Please update the example. The usage example in the class AppiumDriver seems to be outdated too.

SNIPPET CODE from example:
...
private AppiumDriver driver;

    [TestFixtureSetUp]
    public void beforeAll(){
        DesiredCapabilities capabilities = new DesiredCapabilities();

        capabilities.SetCapability("deviceName", "iPhone Retina (4-inch 64-bit)");
        capabilities.SetCapability("platformName", "iOS");
        capabilities.SetCapability("platformVersion", "7.1");
        capabilities.SetCapability("app", "<Path to your app>");
        driver = new AppiumDriver(new Uri("http://127.0.0.1:4723/wd/hub"), capabilities);       
    }

...

HideKeyboard Crashes Appium

I recently just upgraded to 1.2.0.7 and updated methods and interfaces in my code. Most things seem to work the same except HideKeyboard() crashes Appium whenever I try to use it. I noticed its trying to send a symbol for hiding the keyboard.

info: [debug] Socket data received (25 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {"status":0,"value":""}
info: [debug] Responding to client with success: {"status":0,"value":"","sessionId":"edafd8d2-5357-499b-b33e-82b8bf3c9585"}
info: <-- POST /wd/hub/session/edafd8d2-5357-499b-b33e-82b8bf3c9585/element/28/value 200 3676.050 ms - 74 {"status":0,"value":"","sessionId":"edafd8d2-5357-499b-b33e-82b8bf3c9585"}
info: --> GET /wd/hub/session/edafd8d2-5357-499b-b33e-82b8bf3c9585/element/28/name {}
info: [debug] Pushing command to appium work queue: "au.getElement('28').type()"
info: [debug] Sending command to instruments: au.getElement('28').type()
info: [debug] [INST] 2015-01-08 15:48:04 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-01-08 15:48:04 +0000 Debug: responding with:
info: [debug] [INST] 2015-01-08 15:48:04 +0000 Debug: Running system command #32: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":""}...
info: [debug] [INST] 2015-01-08 15:48:05 +0000 Debug: Got new command 32 from instruments: au.getElement('28').type()
info: [debug] Socket data received (37 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {"status":0,"value":"UIASearchBar"}
info: [debug] Responding to client with success: {"status":0,"value":"UIASearchBar","sessionId":"edafd8d2-5357-499b-b33e-82b8bf3c9585"}
info: <-- GET /wd/hub/session/edafd8d2-5357-499b-b33e-82b8bf3c9585/element/28/name 200 968.173 ms - 86 {"status":0,"value":"UIASearchBar","sessionId":"edafd8d2-5357-499b-b33e-82b8bf3c9585"}
info: --> POST /wd/hub/session/edafd8d2-5357-499b-b33e-82b8bf3c9585/element/28/value {"value":["๎€†"],"keysToSend":["๎€†"]}
info: [debug] Pushing command to appium work queue: "au.getElement('28').setValueByType('๎€†')"
info: [debug] Sending command to instruments: au.getElement('28').setValueByType('๎€†')
info: [debug] [INST] 2015-01-08 15:48:05 +0000 Debug: evaluating au.getElement('28').type()
info: [debug] [INST] 2015-01-08 15:48:05 +0000 Debug: evaluation finished
info: [debug] [INST] 2015-01-08 15:48:05 +0000 Debug: responding with:
info: [debug] [INST] 2015-01-08 15:48:05 +0000 Debug: Running system command #33: /usr/local/bin/node /usr/local/lib/node_modules/appium/node_modules/appium-uiauto/bin/command-proxy-client.js /tmp/instruments_sock 2,{"status":0,"value":"UIASearchBar"}...
info: [debug] [INST] 2015-01-08 15:48:06 +0000 Debug: Got new command 33 from instruments: au.getElement('28').setValueByType('๎€†')
info: [debug] [INST] 2015-01-08 15:48:06 +0000 Debug: evaluating au.getElement('28').setValueByType('๎€†')
info: [debug] Socket data received (25 bytes)
info: [debug] Socket data being routed.
info: [debug] Got result from instruments: {"status":0,"value":""}
info: [debug] Responding to client with success: {"status":0,"value":"","sessionId":"edafd8d2-5357-499b-b33e-82b8bf3c9585"}
info: <-- POST /wd/hub/session/edafd8d2-5357-499b-b33e-82b8bf3c9585/element/28/value 200 1501.082 ms - 74 {"status":0,"value":"","sessionId":"edafd8d2-5357-499b-b33e-82b8bf3c9585"}

Not able to find element after keyboard hide

I'm trying to fill this form and then click the 'Done' button. It is working fine in portrait orientation but I'm having trouble in landscape. The driver not able to find the 'SERVER NICKNAME' field in landscape mode. This field initially remain hidden behind the keyboard and then once I make the first keyboard hide call after adding the 'admin' user name I can see the 'SERVER NICKNAME' field in the screen. But driver not able to find it.

screenshot_2015-01-13-12-25-56
screenshot_2015-01-13-12-24-55

            // add server url
            var serverUrl = webDriverWait.Until(d => d.FindElement(By.XPath("//android.widget.EditText[@resource-id='workplace.xxx:id/editconnection_server_url']")));
            serverUrl.SendKeys("http:localhost");

            // add user name
            var userName = webDriverWait.Until(d => d.FindElement(By.XPath("//android.widget.EditText[@resource-id='workplace.xxx:id/editconnection_username']")));
            userName.SendKeys("admin");

            // hide keyboard
            driver.HideKeyboard();

            // add server nickname
            // driver not able to find this element in landscape mode after keyboard hide
            var serverNickName = webDriverWait.Until(d => d.FindElement(By.XPath("//android.widget.EditText[@resource-id='workplace.xxx:id/editconnection_server_nickname']")));
            serverNickName.SendKeys("99 server");

            // hide the keyboard
            driver.HideKeyboard();

            // click on Done button
            var doneButton = webDriverWait.Until(d => d.FindElement(By.XPath("//android.widget.Button[@resource-id='workplace.xxx:id/editconnection_done']")));
            doneButton.Click();

Is there any way to do driver context refresh? Thanks for looking into it and appreciate your help.

Member to get screenshots

The driver should expose a member to allow a client to get screenshots

To this end, the driver should implement the interface OpenQA.Selenium.ITakesScreenshot

Members to set orientation to landscape/portrait

The driver should expose members to allow a client to set the orientation of the device to portrait or landscape

To this end, the driver should implement the OpenQA.Selenium.IRotatable interface.

Add network connection methods (Appium 1.2)

Two methods needed, one to get the network connection, the other to set it.

The network connection is specified as a bitmask, the details of which are here. Feel free to make whatever structure would be idiomatic for the values.

Getting the connection (e.g., wd):
GET, /wd/hub/session/:sessionId?/network_connection

Setting the connection (e.g., wd):
POST, /wd/hub/session/:sessionId?/network_connection
with payload like "parameters": { "type": 1 }

How to switch from safari driver to iOS app driver?

Hi
Following is my scenario:
We have web interface for which we had automation in selenium and C#(MS Test-Specflow).
We have one iOS app for which we have written automation using appium + capabilities for iPad app.
We are running automation from windows machine and with help of remote execution talking with appium server on Mac machine.
Now in one of the scenario we need to click on button in web site which is launching that iOS app. This happens only if web site is open from iPad and safari browser. Once that app opened on UI user have to do some actions then at the end app will create one PDF and close that app, and application switches back to web interface with that PDF showing in UI.
How to swiitch between safari browser and iOS app interface to automate this scenario.

Ex. Suppose In Gmail site there is one button to open Whatsapp. If user clicks on button whatsapp gets open. Then user perform action say send message to particular contact and once action is successful then system redirects user to gmail site.
How to automate such scenario.

malformed URL sent to server

This issue is spawned from appium/appium#4581

Log from appium server

info: --> POST /wd/hub/session//element {"using":"xpath","value":"//*[@resource-id='com.pof.android:id/thetitle']", "locator":"xpath"}

There are occasions when the a request is sent to server with malformed URL. Has anyone seen this issue?

Drug n drop action

Hi there!

I'm using code from examples;

ITouchAction touchAction = new TouchAction(driver) 
                .Press (startX, startY)
                .Wait (duration)
                .MoveTo (endX, endY)
                .Release ();
touchAction.Perform();

And i'm getting 'System.NotImplementedException' here (this.Execute):

public void PerformTouchAction(TouchAction touchAction)
        {
            if (null == touchAction)
            {
                return; // do nothing
            }

            var parameters = new Dictionary<string, object>();
            parameters.Add("actions", touchAction.GetParameters());
            this.Execute(AppiumDriverCommand.TouchActionV2Perform, parameters);
        }

What i'm doing wrong?

Unable to use Tap (possibly other touch actions) using pageobject's proxied element

If you were to use touch actions on elements such as the following:

       // double tapping on element
       new TouchAction(driver).
           Tap(element, x, y, 2)
           .Perform();    

where element is derived from using pageobjects.. this results in the exception:

Additional information: Field 'elementId' defined on type 'OpenQA.Selenium.Remote.RemoteWebElement' is not a field on the target object which is of type 'OpenQA.Selenium.Appium.Android.AndroidElement'.

Seems to be a bug but is there a new way to interact w/ touch actions + page objects?

Lock Command

I tried the lock command and it did not lock the phone.

Error when trying to use AppiumDriver.KeyEvent(String keyCode)

Appium Version: 1.0.0

When I try to call KeyEvent with a string, it's throwing an error.

For example, driver.KeyEvent("66");
generates the following error:
debug: Appium request initiated at /wd/hub/session/77ea3a8a-c7b1-410b-b6fa-65ec29d89642/appium/device/keyevent
debug: Request received with params: {"keycode":"66"}
info: Pushing command to appium work queue: ["pressKeyCode",{"keycode":"66","metastate":null}]
info: [BOOTSTRAP] [info] Got data from client: {"cmd":"action","action":"pressKeyCode","params":{"keycode":"66","metastate":null}}
info: [BOOTSTRAP] [info] Got command of type ACTION
info: [BOOTSTRAP] [debug] Got command action: pressKeyCode
info: [BOOTSTRAP] [info] Returning result: {"value":"java.lang.String cannot becast to java.lang.Integer","status":13}
info: Responding to client with error: {"status":13,"value":{"message":"An unknown server-side error occurred while processing the command.","origValue":"java.lang.String cannot be cast to java.lang.Integer"},"sessionId":"77ea3a8a-c7b1-410b-b6fa-65ec29d89642"}

New release

When can we expect to have a new NuGet release (0.3)? We would like to use the new orientation endpoint, which is not available in 0.2.

Multitouch api fails for double tap with cannot read property 'element' of undefined

I initially created this issue with appium but it turns out to be dotnet client.

This issue is related to appium/appium#4310

          new TouchAction(driver)
                .Tap(point.X, point.Y, count: 2)
                .Perform(); 

Here's the trace:

> info: --> POST /wd/hub/session/8d6776f8-b84f-4fb5-ba04-4237bef7ba74/touch/perform {"actions":[{"action":"press","options":{"x":540,"y":1050}},{"action":"wait","options":{"ms":50}},{"action":"release"},{"action":"wait","options":{"ms":100}},{"action":"press","options":{"x":540,"y":540}},{"action":"wait","options":{"ms":50}},{"action":"release"}]}
> info: <-- POST /wd/hub/session/8d6776f8-b84f-4fb5-ba04-4237bef7ba74/touch/perform 500 0.804 ms - 97 
>     at Array.filter (native)
>     at Function._.filter._.select (C:\Workspace\appium\node_modules\underscore\underscore.js:173:65)
>     at _.(anonymous function) [as filter] (C:\Workspace\appium\node_modules\underscore\underscore.js:1178:39)
>     at null.<anonymous> (C:\Workspace\appium\lib\devices\android\android-controller.js:912:47)
>     at androidController.performTouch (C:\Workspace\appium\lib\devices\android\android-controller.js:990:5)
>     at Object.exports.performTouch [as handle] (C:\Workspace\appium\lib\server\controller.js:331:14)
>     at next_layer (C:\Workspace\appium\node_modules\express\lib\router\route.js:113:13)
>     at Route.dispatch (C:\Workspace\appium\node_modules\express\lib\router\route.js:117:5)
>     at C:\Workspace\appium\node_modules\express\lib\router\index.js:222:24

NOTE: The {"action":"press","options":{"x":540,"y":540}} looks very suspicious as the "y" I am expecting it to be 1050

Cannot perform complex drag and drop

In our app, we have a sliding panel containing items that can be dragged and dropped into the main view. To test that functionality, we perform complex drag and drops using a start, mid, and end points.

This is a method we use when there is only one mid point:

    public static void DragAndDrop(this AppiumDriver driver, Location start, Location midpoint, Location end)
    {
        if (driver == null) { throw new ArgumentNullException("driver"); }

        if (start == null) { throw new ArgumentNullException("start"); }

        if (midpoint == null) { throw new ArgumentNullException("midpoint"); }

        if (end == null) { throw new ArgumentNullException("end"); }

        ITouchAction action = new TouchAction(driver).Press(start.X, start.Y)
                                                     .Wait(ms: 2000)
                                                     .MoveTo(midpoint.X, midpoint.Y)
                                                     .MoveTo(end.X, end.Y)
                                                     .Release();
        action.Perform();
    }

The method does not behave as expected (with and without the call to ITouchAction.Wait). Looking at the screen when calling this method, it seems as if only the press and wait are being performed.

Appium does behave as expected when we don't need the midpoint and have only one call to ITouchAction.MoveTo.

Defect : PerformTouchAction fail in AppiumForWindows-1.3.4.1

I just try to do some multiple action test. just like:

ITouchAction touch = new TouchAction(driver);
touch.Press(50, 50).Release().Perform();

but this test will pass in AppiumForWindows-1.2.4.1

Got Error:
An unhandled exception of type 'OpenQA.Selenium.WebDriverException' occurred in WebDriver.dll

Additional information: Unexpected error. ERROR running Appium command: Cannot read property 'element' of undefined

NullReferenceException in AndroidDriver.ctor

I use Appium server running on Mac machine and AppiumDriver with c# bindings to execute tests from Windows machine. The issue is that when I create an instance of AndroidDriver its ctor rises a NullReferenceException. When I create an instance of RemoteWebDriver, it works smoothly. This is my code:

var caps = new DesiredCapabilities();
caps.SetCapability(MobileCapabilityType.DeviceName, "a0d86205");
caps.SetCapability("udid", "a0d86205");
caps.SetCapability(MobileCapabilityType.App, "https://valid/path/to/my.apk");
caps.SetCapability(MobileCapabilityType.PlatformName, MobilePlatform.Android);

var drv = new AndroidDriver(ServerUri, caps) // rises exception
// var drv = new RemoteWebDriver(ServerUri, caps) // works smoothly

Exception:

System.NullReferenceException : Object reference not set to an instance of an object.
Result StackTrace:  
at OpenQA.Selenium.Appium.AppiumDriver._AddAppiumCommands()
at OpenQA.Selenium.Appium.AppiumDriver..ctor(Uri remoteAddress, ICapabilities desiredCapabilities)
at OpenQA.Selenium.Appium.Android.AndroidDriver..ctor(Uri remoteAddress, DesiredCapabilities desiredCapabilities)

Most recent server responce

info: [debug] Responding to client with success: {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"5.0.1","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"udid":"a0d86205","deviceName":"a0d86205","platformName":"Android","app":"https://valid/path/to/my.apk"},"udid":"a0d86205","deviceName":"a0d86205","platformName":"Android","app":"https://valid/path/to/my.apk"},"sessionId":"9536382e-a320-4d8b-b8cd-3afdd4c0bd68"}
info: <-- GET /wd/hub/session/9536382e-a320-4d8b-b8cd-3afdd4c0bd68 200 0.702 ms - 641 {"status":0,"value":{"platform":"LINUX","browserName":"Android","platformVersion":"5.0.1","webStorageEnabled":false,"takesScreenshot":true,"javascriptEnabled":true,"databaseEnabled":false,"networkConnectionEnabled":true,"locationContextEnabled":false,"warnings":{},"desired":{"udid":"a0d86205","deviceName":"a0d86205","platformName":"Android","app":"https://valid/path/to/my.apk"},"udid":"a0d86205","deviceName":"a0d86205","platformName":"Android","app":"https://valid/path/to/my.apk"},"sessionId":"9536382e-a320-4d8b-b8cd-3afdd4c0bd68"}

Where am I wrong? Why the constructor of AndroidDriver rises this execption and doesn't specify the reason?

Existing TouchActions are a pain in the context of MultiTouchActions

@Astro03 , reusing Selenium TouchActions is more hindrance than help, in particular, some actions takes double parameters rather than int. Rather than scratching my head for hours, I am going to cut this dependency and write a custom TouchAction class. Have to think of a good name so that it is not confusing.

Clicks are not working with Appium 1.3.5

Hi!

Seems like clicks for IOS devices are not working with latest Appium version:

{"status":13,"value":"ERROR running Appium command: invalid json, empty body"}

Request is /element/5003/click with empty body.

The same click works if I use Java client.

Request is the same (/element/5003/click) but the body is not empty: {"id":"5003"}

The client version is 1.2.0.8

add PullFolder

/wd/hub/session/:sessionId?/appium/device/pull_folder
expects {path: String path}

Returns a zip file of the contents of the folder. base63 encoded.

GetScreenshot method is not working

My intention is to take screenshot across different screens for my app, but the GetScreenshot() method is not working. I thought its a problem with my app but later on I tried with this sample app and the result is same. The byte array is empty in the screenshot object.

Error:
screenshot

Appium Log: here

Appreciate your help.

Ongoing work.

@Astro03 , and others, could you post here what methods you are implementing, so we don't do the same job twice.

Load Type error for Multitouch

I am using the Appium Driver and can do things like changing to web/native context view.

However if i use multitouch I get the following could not load type of error:

Could not load type 'OpenQA.Selenium.Appium.MultiTouch.TouchAction' from assembly 'appium-dotnet-driver, Version=0.0.0.0, Culture=neutral, PublicKeyToken=null'

Is there something I am missing? I have all the required dependencies:

image

WebDriver server for URL http://127.0.0.1:4723/wd/hub/session timed out after 60 seconds

Hi,
I have problem with APPIUM C# client and Appium server. Before I used for testing Appium Python client and everything was OK. But now I switched on C# client.

When i'm trying create Appium WebDriver I get always this error -
New-Object : Exception calling ".ctor" with "2" argument(s): "The HTTP request
to the remote WebDriver server for URL http://127.0.0.1:4723/wd/hub/session timed out after 60 seconds."
At C:\autolib\automation\lib\Cmdlets_Common\Appium.ps1:74 char:22 + return New-Object <<<< OpenQA.Selenium.Appium.AppiumDriver((New-Object u
ri($AppiumServerUri)), $capabilities) + CategoryInfo : InvalidOperation: (:) [New-Object], MethodInvoca
tionException + FullyQualifiedErrorId : ConstructorInvokedThrowException,Microsoft.Power
Shell.Commands.NewObjectCommand

This apk file has 12MB and test is running on virtual environment (WM) and on emulator, so It is possible that environment is slowed down that TimeOut 60 second for installation of APK is reached. But why didn't I have this same problem with python client and my most important question - it is possible to change this timeout?

thanks a lot

Null reference exception while adding the custom commandInfo of AppiumDriver

Hello!
I use new Webdriver 2.46.0 and I'm getting null reference exception in AppiumDriver.cs:

dynMethod.Invoke(CommandInfoRepository.Instance, new object[] { entry.Command, commandInfo });

Because this line returns null

var dynMethod = typeof(CommandInfoRepository).GetMethod("TryAddAdditionalCommand", BindingFlags.NonPublic | BindingFlags.Instance);

I've found that in new Selenium version 'TryAddAdditionalCommand' method in CommandInfoRepository was renamed to 'TryAddCommand' and was made public (https://raw.githubusercontent.com/SeleniumHQ/selenium/master/dotnet/CHANGELOG)
2.45.0 source:
https://code.google.com/p/selenium/source/browse/dotnet/src/webdriver/Remote/CommandInfoRepository.cs?name=selenium-2.45.0
2.46.0 source:
https://github.com/SeleniumHQ/selenium/blob/master/dotnet/src/webdriver/Remote/CommandInfoRepository.cs

So this code fixes it:

var dynMethod = typeof(CommandInfoRepository).GetMethod("TryAddAdditionalCommand", BindingFlags.NonPublic | BindingFlags.Instance);
if (dynMethod == null)
            {
                dynMethod = typeof(CommandInfoRepository).GetMethod("TryAddCommand", BindingFlags.Public | BindingFlags.Instance);
            }

If you don't mind I can submit pull request

How install that drivers

Please explain me how install that drivers step by step, of course, if you have enough free time.
I try to build that solution, but don't get .exe - file . What do I do wrong?

appium/app/strings command must be updated

The Appium command 'session/:sessionId?/appium/app/strings' has changed: appium/appium@af89c29

Now it's a POST command and allows an optional parameter language to get strings for a specific language.

  • appium/app/strings without parameters returns the default strings
  • appium/app/strings with the language parameter returns the strings for that language if they exist in the app or the default app strings if not

Cannot Instantiate AppiumDriver , IOS Automation , C# bindings

Hi

I am using

Ios automation
Appium dotnet driver: 1.2.0.8
C# bindings
Appium 1.3.7

public static AppiumDriver AdriverLocal;
AdriverLocal = new AppiumDriver (new Uri("http://10.XXX.XX.XXX:4723/wd/hub"), DCLocal);

execution of this second line throws error : instance of abstract class cannot be created,
Now when this is an abstract class.. how do i use the functions??
Couldnt find any documentation for this change.

Please Reply asap.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.