Skip to content

Commit 2243198

Browse files
wongsi85hassanuz
authored andcommitted
Update latest script (#985)
I'm adding new example script for the nuget package version Appium.WebDriver.4.1.1
1 parent f4449aa commit 2243198

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

Docs/AuthoringTestScripts.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,17 @@ appCapabilities.SetCapability("appArguments", @"MyTestFile.txt");
4040
appCapabilities.SetCapability("appWorkingDir", @"C:\MyTestFolder\");
4141
NotepadSession = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appCapabilities);
4242

43+
// Use the session to control the app
44+
NotepadSession.FindElementByClassName("Edit").SendKeys("This is some text");
45+
46+
// Appium.WebDriver.4.1.1
47+
// Launch Notepad
48+
var appiumOptions = new OpenQA.Selenium.Appium.AppiumOptions();
49+
x.AddAdditionalCapability("app", @"C:\Windows\System32\notepad.exe");
50+
x.AddAdditionalCapability("appArguments", @"MyTestFile.txt");
51+
x.AddAdditionalCapability("appWorkingDir", @"C:\MyTestFolder\");
52+
var NotepadSession = new WindowsDriver<WindowsElement>(new Uri("http://127.0.0.1:4723"), appiumOptions);
53+
4354
// Use the session to control the app
4455
NotepadSession.FindElementByClassName("Edit").SendKeys("This is some text");
4556
```
@@ -72,4 +83,4 @@ Below are the capabilities that can be used to create Windows Application Driver
7283
| appTopLevelWindow | Existing application top level window to attach to | `0xB822E2` |
7384
| appWorkingDir | Application working directory (Classic apps only) | `C:\Temp` |
7485
| platformName | Target platform name | Windows |
75-
| platformVersion | Target platform version | 1.0
86+
| platformVersion | Target platform version | 1.0

0 commit comments

Comments
 (0)