-
Notifications
You must be signed in to change notification settings - Fork 782
Adds sphix style definitions to important methods. #994
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Adds sphix style definitions to important methods. #994
Conversation
src/SeleniumLibrary/__init__.py
Outdated
| :param driver: Instance of the Selenium `WebDriver`. | ||
| :param alias: Alias given for this `WebDriver` instance. | ||
| :type driver: selenium.webdriver.remote.webdriver.WebDriver | ||
| :type alias: intger or string |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- I'd prefer having
:typeright after the matching:param. - Type of alias seems wrong in many ways. Should it be a class, not free text? There's a typo. And alias actually is always a string.
- Do we need to specify the type for all arguments, including strings? I noticed you hadn't added types to such arguments in other places and I think that's OK.
src/SeleniumLibrary/__init__.py
Outdated
| :param parent: Optional parent `WebElememt` to search child elements | ||
| from. By default search starts from the root using `WebDriver`. | ||
| :type parent: selenium.webdriver.remote.webelement.WebElement | ||
| :return: list of found `WebElement` or `[]` if element not found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This isn't too clear. Wouldn't just List of found elements. be enough when the type specified explicitly below. If you want to explain the list can be empty (which ought to be pretty obvious), something like If no matching elements are found, the list is empty. could be added as well.
src/SeleniumLibrary/__init__.py
Outdated
| Always returns a list of `WebElement` objects. If no matching element | ||
| is found, the list is empty. Otherwise semantics are exactly same | ||
| as with :meth:`find_element`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is duplicate information now that arguments are explained above and can be removed.
src/SeleniumLibrary/base/context.py
Outdated
| :param parent: Optional parent `WebElememt` to search child elements | ||
| from. By default search starts from the root using `WebDriver`. | ||
| :type parent: selenium.webdriver.remote.webelement.WebElement | ||
| :return: list of found `WebElement` or `[]` if element not found. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also this explanation can be enhanced and the paragraph below containing duplicate information removed.
1e5507b to
fb963b0
Compare
Part of #882