robotframework

How to run specific test cases from a test suite using Robot Framework

五迷三道 提交于 2019-12-02 22:22:07
I am new to Robot and am learning to write logic and test cases. I have a test suite, "mytestsuite.robot", which has a lot of test cases. I have a couple of errors in one of my test cases. How do I run just that specific test case since I don't want to run the whole test suite again? File mytestsuite.robot testcase1 .... .... testcase2 .... .... testcase3 .... .... testcase4 .... .... Say test case 3 failed, and I want to just rerun test case 3. I tried to use: pybot mytestsuite.robot -t testcase3 But I get an error. Bryan Oakley You want to use the option -t or --test , but the option goes

Using already opened Browser window in Robot framework

好久不见. 提交于 2019-12-02 22:07:29
问题 We are using Robot Framework for writing/automating acceptance test cases. Every time i need to run the whole script to check the last lines of code of my script, That Wastes lot of time and creates lots of duplicate records in the system, i just wanted to avoid re-running whole script to check last lines of code and resume the execution from the point where it erred in previous run. That is to say;If the test run throws error; it will not just close the browser window; And next run will use

Debugging robot framework python keyword libraries

独自空忆成欢 提交于 2019-12-02 20:52:10
For learning purposes I want to follow the execution path in a robot framework python library. Actually the ssh library What is the best way to do this? I have looked at debug lib , which seems to provide me with the ability to set a breakpoint and spawn a new shell. However I want to examine the execution flow, the stack and the variable values set. Something like pudb but triggered via pybot. Is this possible? You can use pdb with robot. How to do so is documented in the robot framework user guide, in the section titled Using the python debugger (pdb) . The example it gives is to add this

Install wxPython 2.8 (For Ride) on OSX “El Capitan”

左心房为你撑大大i 提交于 2019-12-02 18:55:41
I'm trying to install wxPython 2.8 unicode version, to be able to use robotframework-ride. So far the installer downloaded from the site failed with an error saying "There was no software to install" And using Brew installs the 3.0 version, that is not compatible with ride. I would appreciate some help on this issue, I'm a new Mac user (just got given one at the office, and have to use it for my project) , and this is the only thing so far that I haven't been able to solve at all. The version I need to install is: wxPython2.8-osx-unicode-2.8.12.1-universal-py2.7 The installer doesn't seem to

How to create a custom Python code library for the Robot Framework

不问归期 提交于 2019-12-02 18:09:15
I already have Python source files for some custom tasks. Can I create a custom library of these tasks as keywords and use in the Robot Framework? Bryan Oakley Yes, you can. This is all documented fairly extensively in the Robot Framework user guide, in the section titled Creating test libraries . You have a couple of choices. You can use your module directly, which makes every method in the module available as a keyword. This is probably not what you want since the library probably wasn't designed to be used as a collection of keywords. Your second choice is to create a new library that

Accessing elements located by custom locator strategy with Javascript

限于喜欢 提交于 2019-12-02 17:09:29
问题 I have following issue: I have a checkbox which is hidden and there is another layer used to make it nice and shiny I can easily change its value by accessing its ID however I also need to access this element using my custom locator which uses xpath (that has to stay variable) So, here's my script: Custom Select Checkbox id=my_checkbox #that works fine Custom Select Checkbox customLocatorStrat #that doesn't work at all *** Keywords *** Custom Select Checkbox [Arguments] ${locator} ${timeout}=

Failed to compare images with Imagemagick with robot framework on Windows environment

允我心安 提交于 2019-12-02 16:59:49
问题 I am using Imagemagick to compare two screenshots in windows environment. https://blog.codecentric.de/en/2017/09/robot-framework-compare-images-screenshots/ *** Settings *** Library String Library OperatingSystem *** Variables *** ${IMAGE_COMPARATOR_COMMAND} C:\\"Program Files"\\ImageMagick-7.0.7-Q16\\convert.exe *** Test Cases *** Image Comparison Ok Compare Images C:/Users/user/imagecompare/Test/src/reference-screenshots/reference-1.png C:/Users/user/imagecompare/Test/src/test-screenshots

Using Robot Framework for ATDD

允我心安 提交于 2019-12-02 16:48:13
I would like to hear other people's experience with Robot Framework for automated acceptance testing. What are its major strengths and weaknesses as well as any comparison with other frameworks (mainly Fitnesse and Selenium)? The code that will be tested is real-time, legacy code, mainly in C++. Bryan Oakley I have used Robot Framework at three different companies spanning about six years at the time that I write this, and all have been successful in one way or another. My experiences Company 1 The first place I used Robot was a Java-based web application for a top-tier Internet travel company

Xpath with combination of Preceding-sibling and following-sibling

為{幸葍}努か 提交于 2019-12-02 16:08:17
问题 I am trying to read the values from this screen( Sections appears dynamically it can be more than one). We have to read each field like Local Radios, MAC Address, Version from General Application Statistic and Default Geo Code from Legacy Configuration.. i got xapth to identify how many sections displayed. But unable to read the content under each section. i have to read them like key/value pair.. Due to the structure of html(Below) I am having tough time to write xpath between two section

RobotFramework: Keyword 'Selenium2Library.Input Text' Error Keyword 'Input Username' expected 1 arguments, got 0

主宰稳场 提交于 2019-12-02 14:01:38
问题 Code: Input Username [Arguments] ${username} Input Text login_username_id ${username} Error:- Keyword 'Input Username' expected 1 arguments, got 0 May i know why am i getting this error? 回答1: Pass in self as the first argument in your method. Something like: def input_username(self, arg1): 回答2: The error message is telling you exactly what the problem is: your keyword Input Username expects exactly one argument, but the place where you are calling it is only providing one argument. 来源: https: