Fix dropdown menu does not open with firefox 34
Firefox update changed behaviour of the selenium tests, it is not enough to click on the div representing dropdown menu region, one must click on the first child (which is now button, but i suppose it can change over time to input or anything else) in order to open the dropdown menu. Closes-Bug: #1399268 Partially implements blueprint: selenium-integration-testing Change-Id: If9aed4b547f843d16ba729f84cb2c02acb2a0a4d
This commit is contained in:
parent
b1ffe3b53c
commit
34e959e006
@ -42,6 +42,7 @@ class DropDownMenuRegion(baseregion.BaseRegion):
|
|||||||
"""Drop down menu region."""
|
"""Drop down menu region."""
|
||||||
|
|
||||||
_menu_items_locator = (by.By.CSS_SELECTOR, 'ul.dropdown-menu > li > *')
|
_menu_items_locator = (by.By.CSS_SELECTOR, 'ul.dropdown-menu > li > *')
|
||||||
|
_menu_first_child_locator = (by.By.CSS_SELECTOR, '*')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def menu_items(self):
|
def menu_items(self):
|
||||||
@ -54,9 +55,9 @@ class DropDownMenuRegion(baseregion.BaseRegion):
|
|||||||
return "open" in self.src_elem.get_attribute('class')
|
return "open" in self.src_elem.get_attribute('class')
|
||||||
|
|
||||||
def open(self):
|
def open(self):
|
||||||
"""Opens menu."""
|
"""Opens menu by clicking on the first child of the source element."""
|
||||||
if self.is_open() is False:
|
if self.is_open() is False:
|
||||||
self.src_elem.click()
|
self._get_element(*self._menu_first_child_locator).click()
|
||||||
|
|
||||||
|
|
||||||
class UserDropDownMenuRegion(DropDownMenuRegion):
|
class UserDropDownMenuRegion(DropDownMenuRegion):
|
||||||
|
Loading…
Reference in New Issue
Block a user