robotframework

How do I send value to a date picker in Robot Framework?

倾然丶 夕夏残阳落幕 提交于 2019-12-08 15:19:32
I am trying to automate form filling using robot framework. Could pass values to text fields, drop down list etc, stuck at date. Anyone who has done please help. Rafael Silva You can send, e.g. a date 6 days from today, directly by setting the value of the datepicker element with javascript: ${my_date_to_select}= Get Current Date UTC 6 days %d/%m/%Y Execute JavaScript document.getElementById('ID_OF_YOUR_DATEPICKER').value='${my_date_to_select}' NB: In order to use the keyword 'Get Current Date', you need to add the library DateTime in your settings. Focus jquery=[name=expDate] Press Key jquery

Robot Framework AutoitLibrary run command does not fail but does not open the application

邮差的信 提交于 2019-12-08 15:02:54
问题 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

How to execute jQuery using Selenium2Library under Robot Framework

别等时光非礼了梦想. 提交于 2019-12-08 13:00:05
问题 I am new to robot framework, and want simulate control the jQuery component via executing jQuery However, the Selenium2Library almost drives me crazy. try to get value of the DOM component but the log shows NONE. refer to http://d.pr/i/KXhw The following is my test code. Thanks in advance. click configuration [Tags] xpath Open Browser http://${host} ie Log "123" ${slide val}= Execute JavaScript window.jQuery("#gain_slider_handle").val(); ${title}= Execute JavaScript window.$("head title")[0];

Removing Trailing Comma from Query result in Robot Framework

风格不统一 提交于 2019-12-08 12:54:38
问题 I am extracting data from MySQL that returns query results as follows: ${A} = (('HFL', 'TCFLORWWGMAFVFEQLVRN', 'ZZG', 1625, 'SA,WE,DN_IS,', 84)) In this part 'SA,WE,DN_IS,' the trailing Comma needs to be removed for data validation. I am using robot framework for this and created loops to extract data from the list and compare individual elements with data on the webpage. So far I did not find any method in Robot Framework, specially Collections Library that I can use to remove the trailing

SendKeys method of AutoIT, shell script or pywinauto lib is not working

随声附和 提交于 2019-12-08 12:50:16
问题 Scenario is, I want to handle IE pop up in robot framework with python. To handle pop up, I used AutoIT SendKeys, shell script, pywinauto TypeKeys. The code is working properly when running on a local machine but when I run the script through team city on the agent machine, then it fails. My observation is that in the agent machine the code is not working to handle the windows pop up. After analysis, I have found that this is because the agent machine is working as a locked system while

Is there a way to provide arguments to “Execute JavaScript” in Robot Framework?

♀尐吖头ヾ 提交于 2019-12-08 12:13:53
问题 I need to execute the following evaluate function which should take an argumentlist |@{argList}= | arg1 | arg2 | arg3 | | Execute JavaScript | var header=document.evaluate('//span[contains(text(),"Manage VLAN Profiles")]/following::table[contains(@class,"x-grid")]/tbody/descendant::tr/descendant::td/descendant::*[contains(text(),"AccessVLAN")]',document, null, XPathResult.FIRST_ORDERED_NODE_TYPE, null ).singleNodeValue; return header.textContent; | Here I need to pass the @{argList} to the

Importing test library error for user defined methods

北城以北 提交于 2019-12-08 10:47:32
问题 I created Testclass.py as below: class Testclass(object): def testmethod(self): print "Hi" And I accessed it from .robot file as Library Testclass and I called method testmethod. But when I run through command line pybot login.robot I get import error Error in file 'login.robot': Importing test library 'Testclass' failed: ImportError: No module named Testclass If I don't define class and only define method it works. 回答1: The problem is simply that robot cannot find your library. It only looks

'chromedriver' executable needs to be in PATH. Robot framework pycharm

久未见 提交于 2019-12-08 10:37:55
问题 I am new to Robot framework and I have followed all set up related steps from this link, however, I am getting some error which I am not able to identify. Anybody, please help. *** Settings *** Documentation Simple example using SeleniumLibrary. Library Selenium2Library Library OperatingSystem *** Variables *** ${LOGIN URL} https://www.google.com/ ${BROWSER} Chrome ${EXECDIR} C:\chromedriver_win32\chromedriver.exe *** Test Cases *** Checking browser to login page Setup chromedriver Open

Using Spring-wired libraries with robotframework

别来无恙 提交于 2019-12-08 10:19:30
问题 I have an elaborate Spring bean setup for integration tests. Now I'm looking into writing a Robot library to expose my test data creation / behavior execution / assertion methods to Robot tests. However what I understand from the Robot Framework user guide is that Robot can only instantiate library classes by calling a constructor. This is a bummer because I'd rather have my instances managed by Spring. Ideally, I'd want to be able to give Robot the path to the application context and the

robot framework selenium standalone Only Java Installed

孤街醉人 提交于 2019-12-08 09:35:30
问题 I need some help setting up a Robot Framework with Selenium - both standalone. My configuration is Jenkins + RobotFramework + Selenium all in Standalone Mode. I Want to preconfigure a Job using a test set that is shipped with my self made bundle. In the end I want to make jenkins Job that comes with the selfmade package bundle to something like a automated installation qualification. Everything starts up fine but my test can not load the selenium libs for web test, my last attemp was the