Exemple #1
0
 def test_drag_and_drop_with_offset(self, drag):
     mock_desk = MagicMock()
     DesktopLibrary.drag_and_drop_by_offset(mock_desk,
                                            "some_locator",
                                            x_offset=100,
                                            y_offset=100)
     drag.assert_called_with(unittest.mock.ANY, 100, 100)
Exemple #2
0
 def test_drag_and_drop_with_offset(self):
     mock_desk = MagicMock()
     webdriver.Remote = WebdriverRemoteMock
     ActionChains.drag_and_drop_by_offset = MagicMock()
     DesktopLibrary.open_application(mock_desk, 'remote_url')
     DesktopLibrary.drag_and_drop_by_offset(mock_desk,
                                            "some_locator",
                                            x_offset=100,
                                            y_offset=100)