Skip to content
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

Cleanup and enhance keyword documentation #925

Closed
pekkaklarck opened this issue Sep 26, 2017 · 6 comments
Closed

Cleanup and enhance keyword documentation #925

pekkaklarck opened this issue Sep 26, 2017 · 6 comments

Comments

@pekkaklarck
Copy link
Member

Issue #924 covered enhancing generic library documentation. Similar problems as described in it also in the actual keyword docs. Would be great to go through them too before SL 3.0 final.

@pekkaklarck
Copy link
Member Author

Part of this issue is going through open issue related to documentation and see can they be fixed at the same time.

@pekkaklarck pekkaklarck added rc 1 and removed rc 2 labels Sep 28, 2017
pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Oct 12, 2017
Documentation cleanup is related to robotframework#925.

Select Frame and Select Window documentation still todo.
aaltat pushed a commit that referenced this issue Oct 12, 2017
* Clean up window tests.

Also add explicit tests for using "Set Window Position/Size" with
strings. Selenium seems to already convert values passed to it to
integers, decided to add conversion also to these keywords so that we
don't depent on that behavior.


- Move default locator strategy docs to beginning of the whole locator
  strategy section. This is the most common approach.
- Move note about old limitation with tables to a new place.

Documentation cleanup is related to #925.

Select Frame and Select Window documentation still todo.
pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Oct 13, 2017
- Enhance documentation of ElementKeywords (robotframework#925).
- Add '.' at the end of error and log messages.
- Introduce `ContextsAware.find_elements` helper.
- Change default value of optional `message` from '' to None.
- Use `is_noney` instead of `is_falsy` when default value is None.
- General (and trivial) cleanup to code and tests.
aaltat pushed a commit that referenced this issue Oct 19, 2017
* Cleanup.

- Remove unnecessary coupling between Element and FormElement keywords.
- Enhance related error message.
- Enhance documentation of ElementKeywords (#925).
- Add '.' at the end of error and log messages.
- Introduce `ContextsAware.find_elements` helper.
- Change default value of optional `message` from '' to None.
- Use `is_noney` instead of `is_falsy` when default value is None.
- General (and trivial) cleanup to code and tests.
-Also added more XPath examples. This ought to cover enhancements
proposed by #940.
- Doc string to `find_element`. Mainly to give type hits to IDE but
  higher level APIs should get more docs in general.
- Introduced ElementNotFound error that `ElementFinder.find` uses.
- Move helpers to ContextAware and LibraryComponent to avoid
  unnecessary coupling between different library componets.
- Remove unnecessary helpers when `find_element(locator).method()`
  works as well.
- Rewriter internal logic with `Wait` keywords. This includes
  consistently handling non-existing elements.
- Make unregistering strategy that hasn't been registered an error.
- Consider `<input type="file">` text element consistently.
- General cleanup here and there.
- Move frame related kws to own lib component
- "Element Should (Not) Be Enabled" and "Wait Until Element Is Enabled"
now all validate that the element is enabled and not readonly. Also
removed broken element type validation from the former keywords.
- Doc that elements considered enabled cannot be read-only
- Base class for SeLib exceptions
- Test "Page Should Contain" with text spanning multiple elements.
- User `find_elements` instead of `find_element` when possible.
- Avoid `strategy=value` locator syntax in code.
- Enhance error messages when radio buttons not found.
- Cleanup `Choose File` test and test it with Firefox.
- TableElementFinder._locator to public class variable.
- Remove useless documentation.

Fixes #958.
pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Oct 23, 2017
Fixes robotframework#966. Documentation cleanup also related to robotframework#925.
aaltat pushed a commit that referenced this issue Oct 30, 2017
* Cleanup selecting windows.

* Contains code and test changes related to #966

* Get Window Handles to replace List Windows. See #966.

* Documented cleaned up Select Window.

* Fixes #966. Documentation cleanup also related to #925.

* Moved window keywords to own component
@pekkaklarck
Copy link
Member Author

pekkaklarck commented Nov 5, 2017

This issue has taken ages to get done because there are so many keywords and some of their docs require a total rewrite. There have also been several nasty surprises with functionality, requiring us to do fixes such as #933, #966, #923, #958 and #942. I hope we've uncovered most of these surprises and it doesn't take too much time to finish this.

Below is a list of files under src/SeleniumLibrary/keywords/ with files already cleaned up marked:

pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Nov 5, 2017
Also enhanced docs related to using special attributes when locating
elements.

See robotframework#925.
pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Nov 5, 2017
pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Nov 5, 2017
pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Nov 5, 2017
Also changed disabling this functionality not to work with any false
value. That's related to robotframework#176.
pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Nov 7, 2017
Includes enhancing error messages. Somewhat related to robotframework#925.
pekkaklarck added a commit to pekkaklarck/SeleniumLibrary that referenced this issue Nov 7, 2017
@pekkaklarck
Copy link
Member Author

Issue #188 proposed adding examples to Wait For Condition. Sounds like a good idea to me but I don't have any good examples in my mind. Any ideas @aaltat or others?

@pekkaklarck
Copy link
Member Author

All keyword docs have now been reviewed and cleaned up, but not all PRs with the changes (see my comment above) have yet been merged. Once they are, we need to still regenerate the docs and see there are no obvious problems. Otherwise this issue is about to be done.

aaltat pushed a commit that referenced this issue Nov 8, 2017
* Code cleanup to table related keywords.

Includes enhancing error messages. Somewhat related to #925.

* Fix table keywords handling th cells.

- Fix  "Get Table Cell" and "Table Cell Should Contain" with mixed th/td.
- Fix "Table Column Should Contain" with th when using negative indexes.

Fixes #990.

* Cleanup TableElementFinder.

* Clean-up table test execution.

Earlier most table tests were run both using table locator as the
default strategy and as XPATH. This has several problems:

- It made test system unnecessarily complex.
- Running most tests twice increased execution time considerable.
- It wasn't possible to use any other locator strategy.
- Keyword names said tests would be run using CSS and XPATH locators
  but that wasn't true.

This system was now removed. Tests were changed to use ID, CSS and
XPATH strategies here and there.

* Clean up table keyword docs. #925
aaltat pushed a commit that referenced this issue Nov 8, 2017
Also enhanced docs related to using special attributes when locating
elements.

See #925.
aaltat pushed a commit that referenced this issue Nov 8, 2017
aaltat pushed a commit that referenced this issue Nov 8, 2017
Also changed disabling this functionality not to work with any false
value. That's related to #176.
pekkaklarck added a commit that referenced this issue Nov 9, 2017
See #925 about doc enhancements in general and #188 about exactly this
enhancement.
@pekkaklarck
Copy link
Member Author

This issue is finally about to be ready. Still need to review the generated docs and fix possible problems. The docs can be found from http://robotframework.org/SeleniumLibrary/SeleniumLibrary.html

@aaltat
Copy link
Contributor

aaltat commented Nov 14, 2017

The documentation looks OK for me. Closing the issue.

@aaltat aaltat closed this as completed Nov 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants