Skip to content

Commit

Permalink
maybe this?
Browse files Browse the repository at this point in the history
  • Loading branch information
Wolfe1 committed Nov 4, 2020
1 parent ee6eb2c commit 0545776
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions test/Desktop/test_desktop.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,10 +130,8 @@ def test_switch_application_failure_4(self):
dl = DesktopLibrary()
dl._run_on_failure = MagicMock()
webdriver.Remote = WebdriverRemoteMock
webdriver.Remote.find_element_by_xpath = MagicMock(side_effect=[WebDriverException, 'Window', 'Window'])
self.assertRaisesRegex(AssertionError, 'Error finding window "test" in the desktop session. Is it a top level '
'window handle?.', dl.switch_application_by_name,
'remote_url', window_name='test', exact_match=False)
webdriver.Remote.find_element_by_xpath = MagicMock(side_effect=[WebDriverException, MagicMock(), MagicMock()])
dl.switch_application_by_name('remote_url', window_name='test', exact_match=False)

def test_launch_application_successful(self):
dl = DesktopLibrary()
Expand Down

0 comments on commit 0545776

Please sign in to comment.