Fixed accept_agreements method
Signed-off-by: yevh-berdnyk <ie.berdnyk@gmail.com>
This commit is contained in:
parent
f81f3e0d05
commit
49bc773037
|
@ -185,12 +185,16 @@ class BaseView(object):
|
||||||
}
|
}
|
||||||
|
|
||||||
def accept_agreements(self):
|
def accept_agreements(self):
|
||||||
for button in self.ok_button, self.continue_button:
|
iterations = int()
|
||||||
try:
|
from views.sign_in_view import CreateAccountButton
|
||||||
button.wait_for_element(15)
|
while iterations <= 3 and not CreateAccountButton(self.driver).is_element_displayed():
|
||||||
button.click()
|
for button in self.ok_button, self.continue_button:
|
||||||
except (NoSuchElementException, TimeoutException):
|
try:
|
||||||
pass
|
button.wait_for_element(15)
|
||||||
|
button.click()
|
||||||
|
except (NoSuchElementException, TimeoutException):
|
||||||
|
pass
|
||||||
|
iterations += 1
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def logcat(self):
|
def logcat(self):
|
||||||
|
|
Loading…
Reference in New Issue