Skip to content

Ride execution on safari #243

Closed
Closed

Description

@praduman

How can I run scripts from ride on safari. Is there any driver available for safari.I am using selenium2library.
Kindly help.

Activity

  1. zmlpjuran commented on Oct 23, 2013

    @zmlpjuran

    Hi,
    based on my observation selenium2library 1.4.0 does not support Safari yet.
    It just says that "safari is not a supported browser." That means that there is no method to construct safari driver.

    I run it successfully with selenium 2.37.2 python library and patched file _browsermanagement.py in selenium2library
    You should have set system variable SELENIUM_SERVER_JAR pointing to selenium-server-standalone jar
    But this is a hack.

    Note: I don't know whether _make_safari method should be designed similar to _make_ff but it works for me now.
    I observed that selenium server is still running after test finish in case you not close browser. So, you may observe lot of running java processes. + you must kill these to shut down ride process.

    --- _browsermanagement.~py      Tue Oct 22 19:13:38 2013
    +++ _browsermanagement.py       Wed Oct 23 07:23:52 2013
    @@ -21,7 +21,8 @@
                      'htmlunit' : "_make_htmlunit",
                      'htmlunitwithjs' : "_make_htmlunitwithjs",
                      'android': "_make_android",
    -                 'iphone': "_make_iphone"
    +                 'iphone': "_make_iphone",
    +                 'safari': "_make_safari"
                     }
    
     class _BrowserManagementKeywords(KeywordGroup):
    @@ -82,6 +83,7 @@
             | htmlunitwithjs   | HTMLUnit with Javascipt support |
             | android          | Android       |
             | iphone           | Iphone        |
    +        | safari           | Safari        |
    
    
             Note, that you will encounter strange behavior, if you open
    @@ -477,6 +479,9 @@
             return self._generic_make_browser(webdriver.Remote,
                     webdriver.DesiredCapabilities.IPHONE, remote, desired_capabilities)
    
    +    def _make_safari(self , remote , desired_capabilities , profile_dir):
    +        return self._generic_make_browser(webdriver.Safari,
    +                webdriver.DesiredCapabilities.SAFARI, remote, desired_capabilities)
    
         def _generic_make_browser(self, webdriver_type , desired_cap_type, remote_url, desired_caps):
             '''most of the make browser functions just call this function which creates the
    
    
  2. emanlove commented on Nov 30, 2013

    @emanlove
    Member

    Safari support merged in with #247.

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