robotframework

Calculate date 5 days from today, adding an extra day for each day in the next 5 days that is a weekend day

核能气质少年 提交于 2019-12-08 02:29:43
问题 I am testing using Robot Framework and need to create my own Python keyword. Taking the current date as day 0 (tomorrow as day 1), I am trying to calculate what the date will be 5 days from today. If any of the days in the next 5 days is a Saturday I need to add an extra day to my calculation. Same if any of the days is a Sunday. As a Python beginner, I'm a little out of my depth so any help would be much appreciated 回答1: Basically you need to add 5 business days... This should do it: import

IE browser nor working with robot framework

时光总嘲笑我的痴心妄想 提交于 2019-12-08 02:28:37
问题 I have an issue with robot framework running on IE 8 64 bit browser. I am trying to run the tests on IE, the scripts are failing because it gives an error. Please find the error in a report. Is this because of security settings in IE? And if I make it common security level zones then the browser behaviour is different. As like it minimises and maximises the browser and fails the particular test. Here is the link for the screenshot. And as I know it also depends on the xpaths/ css / javascript

How to make chrome display on the top opened in selenium [Mac OS X]

你说的曾经没有我的故事 提交于 2019-12-08 02:27:40
问题 When I use Firefox browser then the window is on top, but for Chrome it is not. So, how can I make Chrome window be on top? I have seen the selenium2library\keyword\_browsermanagement.py , but can't find any useful keyword(s). 回答1: Have you tried the Get Window Identifiers, Get Window Names, Get Window Titles, List Windows keywords available in the Selenium2Library? If you've success with one of them, you should them be able to Select Window and bring it to the forefront. We could use a bit

Click on Save button on File Download popup in IE11 in robot framework

僤鯓⒐⒋嵵緔 提交于 2019-12-08 02:27:03
问题 Is there a way to click on the Save or Open button in the pop up that appears while downloading a file in IE 11? I am using Robot Framework AutoIt Library. I can handle the windows that comes subsequent after clicking the Save or Save As option. 回答1: What kind of file are you downloading? Depending on the file type you should be able to set a default behaviour in IE11. Personally I think AutoIT solutions with this are overkill, I'd recommend looking at the following blog post for alternative

How to set multi-level test setup/teardown in robot framework

跟風遠走 提交于 2019-12-08 02:15:38
问题 I have some robot test cases separated in directories. The directory hierarchy is: ParentTestDirectory |__ ChidTestDirectoryOne |__ TestOne.robot |__ ChidTestDirectoryTwo |__ TestTwo.robot |__ __init__.robot Content of __init__.robot : *** Settings *** Test Setup LOG TO CONSOLE Test setup from __init__.robot Test Teardown LOG TO CONSOLE Test teardown from __init__.robot Content of TestOne.robot : *** Settings *** Test Setup LOG TO CONSOLE Test setup from TestOne.robot Test Teardown LOG TO

RobotFramework - get current Date

天大地大妈咪最大 提交于 2019-12-08 01:57:25
问题 I need to test that the current date is displayed on my device, The date on the device is in format Monday, September 9, 2018 but when i try to test it i can only use the format Monday, 09, 2018 which would fail the test as there is no 0 in the Month date. page should contain element ${DATE} ${DATE_MESSAGE} get current date result_format=%A, %d, %Y element should contain text ${DATE} ${DATE_MESSAGE} How can change the format in robotframework to verify THis format Monday, September 9, 2018.

Is there a way to route to html files with Vue router?

北慕城南 提交于 2019-12-07 16:52:14
问题 Hello I am using VueJS and the webpack template. I have a bunch of components I can easily display with Vue Router. However, my organization uses Robot Framework for testing and we generate an HTML page using the command: python -m robot.testdoc /tests/directory /destination.html This is basically how I am using the router: import Vue from 'vue' import Router from 'vue-router' import Main from '@/components/Main.vue' import Component1 from '@/components/Component1.vue' import Component2 from

How to open a new tab in same browser using robot frame work

拥有回忆 提交于 2019-12-07 16:28:57
问题 As far as I know there is no straight keyword to open new tab in selenium2library. I have seen the below code which opens a new tab in IE(default browser)for the given URL webbrowser.open_new_tab(url) But I want to write a keyword which opens a new tab on current running browser (it may be any browser). 回答1: It's sloppy, but you can try: from selenium.webdriver.common.keys import Keys actions.key_down(Keys.CONTROL) element.send_keys('t') actions.key_up(Keys.CONTROL) I'm not aware of a browser

Customized Execution status in Robot Framework

梦想与她 提交于 2019-12-07 16:12:33
In Robot Framework, the execution status for each test case can be either PASS or FAIL. But I have a specific requirement to mark few tests as NOT EXECUTED when it fails due to dependencies. I'm not sure on how to achieve this. I need expert's advise for me to move ahead. There is nothing you can do, robot only supports two values for the test status: pass and fail. You can mark a test as non-critical so it won't break the build, but it will still show up in logs and reports as having been run. The robot core team has said they will not support this feature. See issue 1732 for more information

Using Variables in Variable definition

╄→尐↘猪︶ㄣ 提交于 2019-12-07 15:16:28
I am trying to get variables into variables but it wont work. I searched google and tried a lot of stuff but it did not wor out. I hope this question ist not "dumb": What am I doing wrong ? *** Settings *** Library SeleniumLibrary Library OperatingSystem *** Variable *** ${year} Get Time return year ${month} Get Time return month ${day} Get Time return day ${output} ${CURDIR}\Testing\Tests\SRV\csdb_@{year}-@{month}-@{day}.log *** Testcases *** Textfile should have a line saying the service is started ${errors} = Grep File ${output} Test From the robot framework user's guide : The most common