Skip to content

More documentation cleanup - #984

Merged
aaltat merged 5 commits into
robotframework:masterfrom
pekkaklarck:formelement-doc-cleanup
Nov 8, 2017
Merged

aaltat merged 5 commits into
robotframework:masterfrom
pekkaklarck:formelement-doc-cleanup

Conversation

@pekkaklarck

@pekkaklarck pekkaklarck commented Nov 5, 2017 •

Copy link
Copy Markdown
Member

Documentation (and code) clean-up to:

  • formelements.py
  • javascript.py
  • runonfailure.py
  • waiting.py
  • Docs about using default locator strategy

See #925.

Also changed disabling this functionality not to work with any false
value. That's related to robotframework#176.
The file specified with `file_path` must be available on the same host
where the Selenium Server is running.
The file specified with ``file_path`` must be available on machine
where tests are executed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This actually might not be true, at least there is an issue about it: #449

Also I have recollection that Choose File works also with when using selenium gird.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code explicitly validates that the file exists on the machine where the library is installed. That is generally also the machine where tests are executed.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have this feeling that it should work, let me try it out and let's see what happens.

Difference between this keyword and `Input Text` is that this keyword
does not log the given password. See `introduction` for details about
locating elements.
does not log the given password.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is not totally true, the password is logged if loglevel is high enough to display selenium debug messages. See issue #202 for more details.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

True. I didn't actually remember that SeleniumLibrary logs this on DEBUG level. Need to make it more explicit that password isn't logged on INFO level.

@@ -25,20 +25,17 @@ class WaitingKeywords(LibraryComponent):

@keyword
def wait_for_condition(self, condition, timeout=None, error=None):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There has been request to improve the documentation with examples #188 Should we provide few examples in this PR?

@pekkaklarck pekkaklarck Nov 6, 2017 •

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'd do it separately to get this PR closed. A note about that could be added to #925.

@aaltat aaltat Nov 7, 2017 •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ok

@@ -51,53 +48,44 @@ def wait_for_condition(self, condition, timeout=None, error=None):

@keyword
def wait_until_page_contains(self, text, timeout=None, error=None):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should we document that text is searched as it is in the DOM which may not always be same as it is the UI? This is corner case but happens sometimes.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What's the difference in practice? Do you mean that CSS can change the text somehow?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't know how it happens in practice but there has been several issues complaining l, with proof, that text in the DOM is with small letters and text in UI is in capital letters. And because keyword uses xpath to search the text, the text is searched as it's in the DOM. All the issues that I recall, have always been with text case.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

CSS can do all kind of text transform (changing case, adding text before/after, ...) and I assume the text to search is the original, not the styled version. That should be tested, though, before we could document it. Such documentation would also belong to the library main level, not to each keyword searching text.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@@ -51,53 +48,44 @@ def wait_for_condition(self, condition, timeout=None, error=None):

@keyword
def wait_until_page_contains(self, text, timeout=None, error=None):

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

OK

@aaltat
aaltat merged commit 021ded5 into robotframework:master Nov 8, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants