Fixed accept_agreements method

Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
yevh-berdnyk 2018-06-14 19:38:27 +02:00
parent f81f3e0d05
commit 49bc773037
No known key found for this signature in database
GPG Key ID: E9B425FDFC4DEA9C
1 changed files with 10 additions and 6 deletions

View File

@ -185,12 +185,16 @@ class BaseView(object):
}
def accept_agreements(self):
iterations = int()
from views.sign_in_view import CreateAccountButton
while iterations <= 3 and not CreateAccountButton(self.driver).is_element_displayed():
for button in self.ok_button, self.continue_button:
try:
button.wait_for_element(15)
button.click()
except (NoSuchElementException, TimeoutException):
pass
iterations += 1
@property
def logcat(self):