I'm having a problem with running my selenium webdriver tests using jybot either from RIDE or from command prompt. The same tests run with pybot. My understanding is that robot fails to use robotframework-selenium2library-java and instead uses python version robotframework-selenium2library. I've searched a lot for the solution and even followed the steps in "Encapsulate the robotframework-maven-plugin into a jybot-like script and execute from RIDE" posting. Then I was able to run my tests using selenium2library-java with maven plugin. So I've added the file robotframework-selenium2library-java-1.4.0.5-SNAPSHOT-jar-with-dependencies.jar that maven generated to the CLASSPATH, but still getting error running my tests with jybot:
[ ERROR ] Error in file 'C:\Users\...\Documents\Automation\Frameworks\RobotFramework\RF-Selenium2library-java\src\test\robotframework\testsuites\LoginTests\djx_resource.txt': Importing test library 'Selenium2Library' failed: SyntaxError: future feature unicode_literals is not defined (selenium.py, line 17)
Traceback (most recent call last):
File "C:\Python27\Lib\site-packages\Selenium2Library\__init__.py", line 2, in <module>
from keywords import *
File "C:\Python27\Lib\site-packages\Selenium2Library\keywords\__init__.py", line 3, in <module>
from _browsermanagement import _BrowserManagementKeywords
File "C:\Python27\Lib\site-packages\Selenium2Library\keywords\_browsermanagement.py", line 4, in <module>
from selenium import webdriver
File "C:\Python27\Lib\site-packages\selenium\__init__.py", line 15, in <module>
from selenium import selenium
PYTHONPATH:
C:\Python27\Lib\site-packages\robot\libraries
C:\Python27\Lib\site-packages
C:\jython2.5.4rc1\Lib
__classpath__
__pyclasspath__/
C:\jython2.5.4rc1\Lib\site-packages
.
C:\Python27\Scripts
CLASSPATH:
C:\jython2.5.4rc1\jython.jar
C:\Program Files (x86)\QuickTime\QTSystem\QTJava.zip
C:\Users\yankovskya\Documents\Automation\Frameworks\RobotFramework\RF-Selenium2library-java\target\robotframework-selenium2library-java-1.4.0.5-SNAPSHOT-jar-with-dependencies.jar
RF-Selenium2library-java.Src.Test.Robotframework.Testsuites.LoginTests.Valid Login :: A test suite with...
==========================================================================================================
Valid Login | FAIL |
No keyword with name 'Open Browser' found.
Also teardown failed:
No keyword with name 'Close Browser' found.
...
I'm using RIDE 1.2.3, robotframework-2.8.3 running on (Python 2.7.6.and Jython 2.5.4rc1) and robotframework-selenium2library-java-1.4.0.4. Could someone tell me what am I missing here please? Attached is my POM file for the reference.