Skip to content

Do we need to start selenium server to use Selenium2Library in RIDE pls?  #34

Closed

Description

@nethub

Environment Info:

  1. Python26 Jython2.5.1 WindowsXP
  2. we use RF with Seleniumlibrary2.5.7 + selenium-server2.0 fluently.

Question1_____
Do we need to start selenium server to use Selenium2Library in RIDE pls?

Trial Steps_____

  1. put the Selenium2Library folder to this path: C:\Python26\Lib\site-packages
  2. create a new project in RIDE and import the library Selenium2Library to test suite
  3. write test case: the keyword "open browser" has been hightlighted with bold blue style and the tooltip shows the keyword if from selenium2library.
    open browser xxx xxx

4. no matter we started the Selenum-Server2.0 or not, it reported the same error as following:

FAIL: No keyword with name 'Open Browser' found.

20111228 16:07:26.315 ERROR Invalid syntax in file 'd:\ride\wu3\suites\Test1\Array.tsv' in table 'Setting': Importing test library 'Selenium2Library' failed: ImportError: No module named api
PYTHONPATH: ['C:\Python26\Lib\site-packages\Selenium2Library\lib\decorator-3.3.2', 'C:\Python26\Lib\site-packages\Selenium2Library\lib\selenium-2.8.1\py', 'C:\Python26\Lib\site-packages\Selenium2Library\lib\decorator-3.3.2', 'C:\Python26\Lib\site-packages\Selenium2Library\lib\selenium-2.8.1\py', 'C:\Python26\Lib\site-packages', 'C:\Python26\Lib\site-packages\robot\libraries', 'C:\jython2.5.1\Lib', 'classpath', 'pyclasspath/', 'C:\jython2.5.1\Lib\site-packages', 'D:\RIDE\wu3\lib', '.']
CLASSPATH: C:\jython2.5.1\jython.jar;C:\Python26\Lib;
Traceback (most recent call last):
File "C:\Python26\Lib\site-packages\robot\utils\importing.py", line 94, in import
import(name)
File "C:\Python26\Lib\site-packages\Selenium2Library__init
_.py", line 8, in
from keywords import *
File "C:\Python26\Lib\site-packages\Selenium2Library\keywords__init__.py", line 1, in
from _logging import _LoggingKeywords
File "C:\Python26\Lib\site-packages\Selenium2Library\keywords_logging.py", line 4, in
from robot.api import logger

Also, it showed us this error info by using the official demo(login tests) without starting selenium server.

Import Selenium2Library module failed.
Please make sure you have Selenium2Library installed.

Activity

  1. adwu73 commented on Feb 5, 2012

    @adwu73
    Contributor

    looks like an installation issue, you don't need to start server any more in selenium 2

  2. emanlove commented on Feb 7, 2012

    @emanlove
    Member

    nethub,

    adwu73 assessment looks correct. From the first line "no module named api" and the last line "File ... from robot.api import logger" of the traceback I would assume that robotframework is not installed. Previous versions of robotframework-selenium2library and the older SeleniumLibrary came bundled with an older version of robotframework while the upcoming release of robotframwork-selenium2library will use setuptools/distribute. This will allow you to install the lastest version of robotframework or pin it to a known version.

  3. nethub commented on Feb 15, 2012

    @nethub
    Author

    ok.

    1. when to release the newer version of selenium2library with setup-tools?
    2. Also, which version of RF does the first version of selenium2library bundled with pls?

    Thanks!

  4. j1z0 commented on Feb 15, 2012

    @j1z0
    Contributor

    The new release with setup-tools should come out this week. Just need to do a bit more testing.

    The first version was not bundled with RF it was bundled with Selenium. 2.8.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions