Skip to content

Add set window size keyword #146

Closed
Closed

Description

@emanlove

There is a Selenium WebDriver command for setting the window size and it has been requested to have a corresponding Selenium2Library keyword.

Activity

  1. emanlove commented on Mar 18, 2013

    @emanlove
    MemberAuthor

    Implemented feature using dictionary as parameter/return value for set_window_size/get_window_size (See change here). I am wandering if this should be implemented instead as two parameters or a list of two values so it will not require the Collections library. I am sure having it as a dictionary, thus requiring the Collections library, will trip someone up.

  2. ombre42 commented on Mar 18, 2013

    @ombre42
    Contributor

    The method you are wrapping takes width and height as separate, required arguments. I think the keyword should be the same except hide the windowHandle argument.

  3. emanlove commented on Mar 18, 2013

    @emanlove
    MemberAuthor

    @ombre42 Agreed. Thanks for the feedback.

  4. emanlove commented on Mar 20, 2013

    @emanlove
    MemberAuthor

    @ombre42 I've added some keyword documentation with an example. Do you think this is clear? If not, do you have any suggestions for explaining the usage of these keywords.

  5. ombre42 commented on Mar 21, 2013

    @ombre42
    Contributor

    The documentation is clear. Here's my thoughts (you asked!).

    For Set Window Size, the argument names are in single quotes instead of back quotes.
    Here's two alternatives to consider:
    Sets the width and height of the current window.
    Sets the width and height of the current window to the specified values.

    Example for Get Window Size could be just: | ${width} | ${height}= | Get Window Size |. The extra code adds clarity to Set Window Size, but not to Get Window Size.

    Both examples use the values for SVGA (also the values in the Selenium doc), but the values for height and width are swapped.

    I think it is odd Se returns a dict instead of a tuple. Are they going to add depth in the future? :P

  6. modified the milestones: , 1.4 on Aug 29, 2014
  7. ombre42 commented on Aug 29, 2014

    @ombre42
    Contributor

    was in 1.4 release and left open

  8. removed their assignment
    on Sep 1, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions