I am new to the RobotFramework and wanted to get a simple example up and running on PyCharm. I am not too clear on what exactly I need to run the Robot Framework so I installed Python 2.7, robotframework, selenium and robotframework-selenium2library. I am not sure if I need to install the webdriver or the googlechrome driver as well.
What am I missing so that I can run this example? I am really clueless.
You have to download the chromedriver.exe and have to keep it in C:\Python27\Scripts folder. It will pick up the exe from there and run your code.
and follow link
Related
I have a file right here: Library ../../MyLib/My_Lib.py, and I try to import the python file in RIDE, but RIDE still report "FAIL : No keyword with name '****' found", and this keyword is defined in the My_Lib.py, seems RIDE cannot find the python file.
I using python 2.7.8+Robot Framework 3.1.2+windows server 2012r2. I even selected Library -> Name -> Browse in RIDE, but the error still there and this whole robot test case folder is copied from another server which is working fine
Can anyone suggest what have I missed?
Ah! I have worked this out, if anyone else meets the same issue, you can click Tools->view RIDE Log, to see what's happening there. For my case, it's because I didn't install thrift but the My_Lib.py obviously used thrift module, so the My_Lib.py compile failed with "No module named thrift.Thrift".
Is it possible the Python library was created to work with Python 3.x.x leading it to not work on your Python 2.7.8? See https://wiki.python.org/moin/Python2orPython3
Check what python version is being run on the other server where the test is running fine. You might need to update your local Python version.
Also, you could try running the Robot test outside of RIDE just in case. You may do so by navigating to the test folder where the .robot file resides and running the following command:
robot test_file_name.robot
See if you get the same error that way. Please report back after doing the mentioned checks and we can continue debugging, my reputation doesn't let me comment on your question so I will just update the answer as we go along.
I am having an issue that notepad.exe is not getting opened. The run command itself is successful according to the log. But Nothing is opening. I have just installed AutoItLibrary with pip and downloaded and installed Autoit on my machine. My path is only to Python and Python Scripts directory. I have no other components running. Do I have to have any other thing done? have the code Library|AutoitLibrary |Run|notepad.exe |Send|'abc' Send fails saying no such keyword found. I do not see the notepad opening at any point. I also tried wait for the window where it just waits until time out and comes out without the notepad getting opened.
Got it figured out. A Pip install is not doing the full job. I had to download the distro zip file and run the setup install.
I want to use keywords written in DateTime Library
http://robotframework.googlecode.com/hg/doc/libraries/DateTime.html?r=2.8.5
I have robot framework 2.8.6.
Whenever I import this library in my tests in RIDE; it is shown in red (not resolved). Also in documentation I am not able to search the keywords.
Your problem is probably with RIDE and not Robot Framework. RIDE uses its own copy of RF regardless of what you have installed. The included version is out of date. Try copying DateTime.py from Robot Framework installation to the folder in RIDE.
For example, copy C:\apps\Python27\Lib\site-packages\robot\libraries\DateTime.py to
C:\apps\Python27\Lib\site-packages\robotide\lib\robot\libraries
Then restart RIDE.
ombre42 is right, RIDE (my current is 1.3.0) includes an older version of RobotFramework which does not includes DateTime module. You have the RobotFramework 2.8.6 installed, but you doesn't use it when you launch tests using RobotFramework-RIDE.
Two important things:
Copy DateTime.py from your RobotFramework 2.8.6 as ombre42 said, but don't import DateTime using pip: it will work but you'll not get the RobotFramework's one (which is better and documented).
When you run your tests outside of RIDE, in a Jenkins environment for example, you'll probably use the RobotFramework 2.8.6 (or later) and not the same as your RIDE environment.
I'm use RF with Python and by default my IDE sees Python DateTime library.
Use full path:
Library robot.libraries.DateTime
On windows after running the grunt build command for creating brackets shell it gives done without errors but i dont see any .exe file generated..
What might be the problem???
Here are some possible solutions:
Are you following the full brackets-shell build instructions, including all prerequisites?
Make sure Brackets isn't running at the same time. The build will fail silently if the .exe file is currently in use (see bug).
Try with a fresh git clone of the repo. If your brackets-shell local copy has been around for a while, sometimes the build & deps folders can get in a bad state. (I'm assuming you haven't modified the source at all. If you have, try with an unmodified copy of the source first to make sure it builds correctly without any of your changes).
Check that python --version shows 2.7.x
Verbose build output would also be helpful in diagnosing issues like this, but unfortunately there's not yet an easy way to get that...
If you follow the instructions on bracket-shell's wiki page, the Windows executable should be created in the Release directory.
I have a very straightforward PHPUnit test in c:\kim\test\HelloTest.php on a Windows PC. I can execute it from within the c:\kim\test directory with the command:
phpunit HelloTest
The problem is that I can't execute it from any other directory.
As far as I know I should be able to execute this from the c:\kim directory with:
phpunit test
Also, I would have thought the following syntax would work too:
phpunit c:\kim\test
But I don't get any response from the command. Simply a blank line and then I am returned to the cursor.
I am trying to get unit tests working properly with Netbeans and I think I need to solve this problem first. Perhaps it has something to do with paths? Any ideas?
I spent quite a while trying to sort this out, per the comments above. Also tried reinstalling PHPUnit. In the end I ran up a new server, installed XAMPP, and all works fine.
If any help.
I am using makegood extension for eclipse which handle phpunit test execution with one click.
Maybe you can find similar extension for Netbeans or switch to eclipse