Fix test mg runs #57

Merged
merged 2 commits into from Jul 9, 2012

2 participants

@zacc

Migrate manage_versions_page.py

Zac Repair test_manage_runs
Migrate manage_versions_page.py
db7a4ac
@bebef1987 bebef1987 commented on an outdated diff Jul 9, 2012
pages/manage_versions_page.py
self.wait_for_ajax()
def filter_versions_by_name(self, name):
- _filter_locator = self._filter_locator % {'filter_name': name.lower()}
- _filter_suggestion_locator = self._filter_suggestion_locator % {'filter_name': name}
-
- self.type(self._filter_input_locator, name)
- self.selenium.type_keys(self._filter_input_locator, name)
- self.wait_for_element_present(_filter_suggestion_locator)
- self.click(_filter_suggestion_locator)
- self.wait_for_element_present(_filter_locator)
+ _filter_locator = (self._filter_locator[0], self._filter_locator[1] % {'filter_name': name.lower()})
+ _filter_suggestion_locator = (self._filter_suggestion_locator[0], self._filter_suggestion_locator[1] % {'filter_name': name})
+
+ self.selenium.find_element(*self._filter_input_locator).send_keys(name)
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: self.is_element_present(*_filter_suggestion_locator))
+ #self.wait_for_element_present(*_filter_suggestion_locator)

this should be removed?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@bebef1987 bebef1987 commented on an outdated diff Jul 9, 2012
pages/manage_versions_page.py
- _filter_suggestion_locator = self._filter_suggestion_locator % {'filter_name': name}
-
- self.type(self._filter_input_locator, name)
- self.selenium.type_keys(self._filter_input_locator, name)
- self.wait_for_element_present(_filter_suggestion_locator)
- self.click(_filter_suggestion_locator)
- self.wait_for_element_present(_filter_locator)
+ _filter_locator = (self._filter_locator[0], self._filter_locator[1] % {'filter_name': name.lower()})
+ _filter_suggestion_locator = (self._filter_suggestion_locator[0], self._filter_suggestion_locator[1] % {'filter_name': name})
+
+ self.selenium.find_element(*self._filter_input_locator).send_keys(name)
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: self.is_element_present(*_filter_suggestion_locator))
+ #self.wait_for_element_present(*_filter_suggestion_locator)
+ self.selenium.find_element(*_filter_suggestion_locator).click()
+ WebDriverWait(self.selenium, self.timeout).until(lambda s: self.is_element_present(*_filter_locator))
+ #self.wait_for_element_present(*_filter_locator)

here to

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
@bebef1987

lgtm

@bebef1987 bebef1987 merged commit 444db25 into mozilla:webdriver Jul 9, 2012
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment