robotframework

Verification of presence of one text of 2 texts in the page using selenium2library & Robot Framework

孤街浪徒 提交于 2019-12-22 09:20:07
问题 I want to test if the page contains "TEXT1 or "TEXT2". Page Should Contain TEXT1 or TEXT2. Any suggestion how can I do this? Currently I can only check for one text. 回答1: You can use Page Should Contain Element with a locator xpath=//*[contains(text(),'TEXT1') or contains(text(),'TEXT2')] 回答2: Thanks Slanec for the info. I've also found out another way to solve this just using Robot Framework, it goes like this. @{VAR1} = Run Keyword and Ignore Error Wait Until Page Contains TEXT1 Run Keyword

Running unittest Test Cases and Robot Framework Test Cases Together

烈酒焚心 提交于 2019-12-22 06:47:00
问题 Our group is evaluating Robot Test Framework for our QA group, not just for BDD, but also to possibly cover a lot of our regular functionality testing needs. It certainly is a compelling project. To what extent, if any, is Robot Framework based on xunit (unittest) architecture? I see that unittest asserts can be used, but I don't see that the RF testcases themselves are based on unittest.TestCase. Ideally, our organization would like to be able to be able to write Robot Framework tests, as

In Robot Framework, what is the difference between a List Variable and a Scalar Variable containing a list?

我的未来我决定 提交于 2019-12-22 05:48:15
问题 In Robot Framework, we can assign a list to a Scalar Variable or to a List Variable, as shown below: | @{list} = | Create List | a | b | c | | ${scalar} = | Create List | a | b | c | What is the difference between a List Variable and a Scalar Variable containing a list? 回答1: In case of the assignment shown in your question, there is no difference. If you log each of those you'll get the exact same output. Note : this functionality was introduced in version 2.8 (see Using scalar variables as

Set auto download preference profile using selenium2library

℡╲_俬逩灬. 提交于 2019-12-22 01:30:30
问题 Environment: robotframework-selenium2library I am looking for a way in selenium2library to make the auto-downloading the file by setting the preference in FirefoxProfile as this is the solution I can find. However, it seems that I can not use the way I listed as following in selenium webdriver to import the preference profile into the browser in selenium2library. Using selenium webdriver: fp = webdriver.FirefoxProfile() fp.set_preference("browser.download.folderList",2) fp.set_preference(

How to compare two images in Robot Framework

筅森魡賤 提交于 2019-12-21 23:31:50
问题 I am new in automation and want to automate a site whose back-end in HTML5 and containing canvas element. I want to compare canvas images with my stored image. For image comparison I need to use robot framework. I had tried with "robotframework-imagehorizonlibrary" library but still testcases were failed. Can any one please help me. Thanks. 回答1: I would suggest the RobotAppEyes Library , which is basically an extended version of Selenium2 library, and it actually has a keyword named Compare

Unhandled error “Cannot find context with specified id” using Robot framework

我们两清 提交于 2019-12-21 16:34:10
问题 I have a problem when working with iframe using Robot framework and Selenium2Library. It throws error: WebDriverException: Message: unknown error: unhandled inspector error: {"code":- 32000,"message":"Cannot find context with specified id"} (Session info: chrome=55.0.2883.87) (Driver info: chromedriver=2.25.426923 (0390b88869384d6eb0d5d09729679f934aab9eed),platform=Windows NT 6.1.7601 SP1 x86_64) My test code is: Fill In Description ${description} Wait Until Element Is Visible ${FRAME} 40

How can a test called by Robot Framework return information to the console

人走茶凉 提交于 2019-12-21 09:13:46
问题 I have a robot framework test suite that calls a python method. I would like that python method to return a message to the console without failing the test. Specifically I am trying to time a process. I can use "raise" to return a message to the console, but that simultaneously fails the test. def doSomething(self, testCFG={}): ''' Do a process and time it. ''' testCFG['operation'] = 'doSomething' startTime = time.time() response=self.Engine(testCFG) endTime = time.time() duration = int(round

How to set path chrome driver in robot framework?

不想你离开。 提交于 2019-12-21 04:59:25
问题 Now, I set path variable path : D:..;C:\Program Files\Google\Chrome\Application Chrome : C:\Program Files\Google\Chrome\Application\chromedriver.exe I can call open Chrome in command line. But error when run in RIDE FAIL : WebDriverException: Message: unknown error: Chrome failed to start: crashed (Driver info: chromedriver=2.13.307647 (5a7d0541ebc58e69994a6fb2ed930f45261f3c29),platform=Windows NT 6.1 SP1 x86) 回答1: You need chromeDriver not Chrome. Start by downloading the chrome driver.

How to test for blank text field when using robotframework-selenium?

ⅰ亾dé卋堺 提交于 2019-12-21 04:02:26
问题 How can I specify blank/empty value for a text field when using the robotframework-seleniumlibrary with a TSV file? For example, I have the following: Textfield Value Should Be identifier=name1 Chris Textfield Value Should Be identifier=name2 I want to test that name2 is blank. I have tried leaving it blank (which returns a message about an incorrect number of arguments. I have tried "", which looks for a pair of quotes, and '' which enters a single quote, and selenium seems to look for that

Run a test case Multiple times and display the pass and fail count under test statistics

a 夏天 提交于 2019-12-21 02:33:11
问题 How to run a particular test case multiple times and display the pass and fail count under Test Statistics? Below is the current code I have to run a test case multiple times. (The test case is implemented in a keyword and called) *** Test Cases *** Testcase repeat keyword 5 Run Keyword And Continue On Failure Execute *** Keywords *** Execute log Hello world! The code is run from cmd using "pybot testcase.robot" This code runs the test multiple times but I'm not getting the final pass/fail