Merge lp://staging/~fs-8/selenium-simple-test/sst-remote-fixes into lp://staging/selenium-simple-test

Proposed by Florian Sesser
Status: Needs review
Proposed branch: lp://staging/~fs-8/selenium-simple-test/sst-remote-fixes
Merge into: lp://staging/selenium-simple-test
Diff against target: 26 lines (+5/-3)
1 file modified
src/sst/scripts/remote.py (+5/-3)
To merge this branch: bzr merge lp://staging/~fs-8/selenium-simple-test/sst-remote-fixes
Reviewer Review Type Date Requested Status
Corey Goldberg (community) Needs Fixing
Review via email: mp+168557@code.staging.launchpad.net

Description of the change

sst-remote, changes: correct command line parameter, switch parameters to browser factory

---------

Hi!

I was trying to use SST with a remote Selenium server for the first time (on my laptop, in a windows VM, to do cross-browser testing in IE). sst-remote didn't work for me and threw what was looking like simple oversight mistakes. I changed two lines of code and got SST-Remote working with a Selenium 2.33.0 server in a windows 8 env.

Maybe the python Selenium bindings API has been changed? Maybe this was broken for quite some time? I don't know!

HTH,

Flo

To post a comment you must log in.
Revision history for this message
Corey Goldberg (coreygoldberg) wrote :

thanks for picking up that mistake.. you can see that sst.remote is neglected in terms of test coverage compared to the rest of sst :)

one small nitpick before merging this branch:
the way you have brackets/parens closed is not pep8 compliant, so it breaks our pep8 unit test.
can you fix up the closing brackets/parens and re-push to your branch?

it should be like:

    browser_factory = browsers.RemoteBrowserFactory(
        cmd_opts.webdriver_remote_url,
        {
            "browserName": cmd_opts.browser_type.lower(),
            "platform": cmd_opts.browser_platform.upper(),
            "version": cmd_opts.browser_version,
            "javascriptEnabled": not cmd_opts.javascript_disabled,
            "name": cmd_opts.session_name,
        },
    )

regards,
-Corey

review: Needs Fixing
421. By Florian Sesser

Make brackets/parens closing PEP-8 compliant

Revision history for this message
Florian Sesser (fs-8) wrote :

Thank you for your review, please excuse my taking so long! I have gladly included your suggestion and re-pushed.

Revision history for this message
adam (jun-gao) wrote :

I used pip and installed sst version 0.2.4, but the problem still there, it has not been fixed.

I checked your code, and I think the fundamental problem is in 'browsers.py' line 79. Since selenium's remote webdriver is defined like "def __init__(self, command_executor='http://127.0.0.1:4444/wd/hub',desired_capabilities=None, browser_profile=None, proxy=None, keep_alive=False):" which means the "remote_url" should be the first argument and the second should be the "capabilities".

Unmerged revisions

421. By Florian Sesser

Make brackets/parens closing PEP-8 compliant

420. By Florian Sesser

Swap browser factory arguments into the order expected by Selenium 2.33.0

419. By Florian Sesser

Fix (presumably) typo in sst-remote

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
The diff is not available at this time. You can reload the page or download it.

Subscribers

People subscribed via source and target branches