Skip to content

Commit

Permalink
Update latest script (#985)
Browse files Browse the repository at this point in the history
I'm  adding new example script for the nuget package  version Appium.WebDriver.4.1.1
  • Loading branch information
wongsi85 authored and hassanuz committed Dec 10, 2019
1 parent f4449aa commit 2243198
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion Docs/AuthoringTestScripts.md
Expand Up @@ -40,6 +40,17 @@ appCapabilities.SetCapability("appArguments", @"MyTestFile.txt");
appCapabilities.SetCapability("appWorkingDir", @"C:\MyTestFolder\");
NotepadSession = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appCapabilities);

// Use the session to control the app
NotepadSession.FindElementByClassName("Edit").SendKeys("This is some text");

// Appium.WebDriver.4.1.1
// Launch Notepad
var appiumOptions = new OpenQA.Selenium.Appium.AppiumOptions();
x.AddAdditionalCapability("app", @"C:\Windows\System32\notepad.exe");
x.AddAdditionalCapability("appArguments", @"MyTestFile.txt");
x.AddAdditionalCapability("appWorkingDir", @"C:\MyTestFolder\");
var NotepadSession = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appiumOptions);

// Use the session to control the app
NotepadSession.FindElementByClassName("Edit").SendKeys("This is some text");
```
Expand Down Expand Up @@ -72,4 +83,4 @@ Below are the capabilities that can be used to create Windows Application Driver
| appTopLevelWindow | Existing application top level window to attach to | `0xB822E2` |
| appWorkingDir | Application working directory (Classic apps only) | `C:\Temp` |
| platformName | Target platform name | Windows |
| platformVersion | Target platform version | 1.0
| platformVersion | Target platform version | 1.0

0 comments on commit 2243198

Please sign in to comment.