Skip to content
This repository has been archived by the owner on Jun 27, 2024. It is now read-only.

Commit

Permalink
some tests for the feature
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfe1 committed Aug 3, 2022
1 parent bcf18ce commit 01d901f
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 2 deletions.
2 changes: 1 addition & 1 deletion docs/DesktopLibraryDocumentation.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion docs/MobileLibraryDocumentation.html

Large diffs are not rendered by default.

4 changes: 4 additions & 0 deletions samples/WinAppDriver-DesktopTests.robot
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,10 @@ Switch Application By Name or Locator
# Switch back to the main window to make sure it gets closed
Switch Application Main

Working Directory Test
[Setup] Open Application ${REMOTE_URL} platformName=Windows deviceName=Windows app=${Notepad} appWorkingDir=C:/Windows/System32
Switch Application By Name ${REMOTE_URL} Notepad exact_match=False appWorkingDir=C:/Windows/System32

Switch Application Multiple Desktop
# Open Application creates a new desktop session for this isnatnce, useful when running tests on multiple computers
Open Application ${REMOTE_URL} platformName=Windows deviceName=Windows app=${Notepad} alias=Notepad desktop_alias=Desktop2
Expand Down
7 changes: 7 additions & 0 deletions test/Desktop/test_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,13 @@ def test_open_application_successful(self):
dl.open_application('remote_url')
self.assertTrue(dl._cache.current)

def test_open_application_with_working_dir_successful(self):
dl = DesktopLibrary()
webdriver.Remote = WebdriverRemoteMock
self.assertFalse(dl._cache.current)
dl.open_application('remote_url', appWorkingDir='C:/Windows/System32')
self.assertTrue(dl._cache.current)

def test_open_application_failure(self):
dl = DesktopLibrary()
dl._open_desktop_session = MagicMock()
Expand Down

0 comments on commit 01d901f

Please sign in to comment.