Skip to content
Snippets Groups Projects

Fix StaleElementException when waiting for loading of Subscriptions

Files
3
@@ -54,8 +54,8 @@ class UntestedParent:
@@ -54,8 +54,8 @@ class UntestedParent:
# stage can be 'initial', 'validate', or 'conflict'
# stage can be 'initial', 'validate', or 'conflict'
def _go_to_subscription(self, stage='initial', sub_type=None):
def _go_to_subscription(self, stage='initial', sub_type=None):
 
WebDriverWait(self.browser, 10).until(subscriptions_loaded_cond(self.browser))
tasks = self.browser.find_element_by_name('subscription-list')
tasks = self.browser.find_element_by_name('subscription-list')
WebDriverWait(self.browser, 10).until(subscriptions_loaded_cond(tasks))
tab = tasks.find_element_by_xpath(f'//*[contains(text(), "{stage}")]')
tab = tasks.find_element_by_xpath(f'//*[contains(text(), "{stage}")]')
tab.click()
tab.click()
sub_type = sub_type if sub_type is not None else self.sub_type
sub_type = sub_type if sub_type is not None else self.sub_type
Loading