Skip to content
This repository has been archived by the owner on Nov 23, 2023. It is now read-only.

Use AppiumOptions instead of dict #30

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions AppiumFlutterLibrary/keywords/_applicationmanagement.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
from AppiumFlutterLibrary.utils import ApplicationCache
from AppiumFlutterLibrary.keywords.keywordgroup import KeywordGroup
from appium.webdriver import Remote
from appium.options.common.base import AppiumOptions

class _ApplicationManagementKeyWords(KeywordGroup):
def __init__(self):
Expand All @@ -30,7 +31,7 @@ def open_application(self, remote_url, alias =None, **kwargs):
if desired_caps['automationName'] != 'flutter':
raise ValueError("Appium Flutter Library only suports flutter automation. Try changing automationName capability to 'flutter'")
self._debug("Opening application")
application = Remote(str(remote_url), desired_caps)
application = Remote(str(remote_url), options=AppiumOptions().load_capabilities(desired_caps))
return self._cache.register(application, alias)

def reset_application(self):
Expand Down Expand Up @@ -134,4 +135,4 @@ def _current_application(self):

def _rotate(self, orientation):
driver = self._current_application()
driver.orientation = orientation
driver.orientation = orientation