Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
Selenium Overhaul #4732
The previous YAML file "navigation-data.yml" was pretty unstructured - labels, selectors, text all over the place. Sometimes selectors outside of other components, etc... The new YAML file "navigation.yml" has a pretty clear grammar at the top and is parsed in a structured way. The idea is to break everything into components and sub-components. Any component can be associated with "selectors" (which can be XPATH, CSS, etc...), labels, and text bits. These are parsed into objects which have a more object oriented and more uniform interface. The commit is large and changes a lot - but just take for instance the following diff:
- self.click_xpath(self.navigation_data["selectors"]["registrationPage"]["submit_xpath"]) + self.wait_for_and_click(self.navigation.registration.selectors.submit)
As the consume of the selector - you don't need to know it is XPATH for instance. Before we had different wait methods for CSS, XPATH, Labels, IDs, etc.... Now for all selectors coming out of the navigation component data you can just use a single method. Also note that it goes from component to selector to selector name for all selectors and the more concise object oriented accession then the previous raw dictionary based approach.
Here is a Jenkins build that passes with this branch https://jenkins.galaxyproject.org/view/All/job/jmchilton-selenium/42/. Hopefully that will help make merging easier?