Skip to content

Commit 4701d65

Browse files
authored
docs(readme): improve python example (#13)
1 parent f361a20 commit 4701d65

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

README.md

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -54,22 +54,20 @@ Please note that more capabilities will be added as the development of this driv
5454
import pytest
5555

5656
from appium import webdriver
57-
from appium.options.common.base import AppiumOptions
57+
from appium.options.windows import WindowsOptions
5858

5959
def generate_options():
60-
uwp_options = AppiumOptions()
60+
uwp_options = WindowsOptions()
6161
# How to get the app ID for Universal Windows Apps (UWP):
6262
# https://www.securitylearningacademy.com/mod/book/view.php?id=13829&chapterid=678
6363
uwp_options.app = 'Microsoft.WindowsCalculator_8wekyb3d8bbwe!App'
6464
uwp_options.automation_name = 'NovaWindows'
65-
uwp_options.platform_name = 'Windows'
6665

67-
classic_options = AppiumOptions()
66+
classic_options = WindowsOptions()
6867
classic_options.app = 'C:\\Windows\\System32\\notepad.exe'
6968
classic_options.automation_name = 'NovaWindows'
70-
classic_options.platform_name = 'Windows'
7169

72-
use_existing_app_options = AppiumOptions()
70+
use_existing_app_options = WindowsOptions()
7371
# Active window handles could be retrieved from any compatible UI inspector app:
7472
# https://docs.microsoft.com/en-us/windows/win32/winauto/inspect-objects
7573
# or https://accessibilityinsights.io/.
@@ -80,7 +78,6 @@ def generate_options():
8078
# https://github.com/microsoft/WinAppDriver/blob/master/Samples/C%23/StickyNotesTest/StickyNotesSession.cs
8179
use_existing_app_options.app_top_level_window = hex(12345)
8280
use_existing_app_options.automation_name = 'NovaWindows'
83-
use_existing_app_options.platform_name = 'Windows'
8481

8582
return [uwp_options, classic_options, use_existing_app_options]
8683

0 commit comments

Comments
 (0)