我正在使用Robot Framework (RF)搜索与我的网站相关的关键字,以了解/找到我的网站在谷歌搜索页面中的排名位置(排名:第一,第二,...哪一页?第一页,第二页?)。
下面是我的代码:
*** Test Cases ***
Rank
Open Browser http://www.google.com.vn gc
Input Text name=q atdd framework
Submit Form xpath=//form[@action='/search']
Wa
每次运行脚本时,我都会收到WebDriver Exception: Message: Timeouts.我有python版本2.7.14、robotframework版本3.0.4和selenium库版本3.1.1。我希望有人能帮助我。
下面是我正在编写的代码。
*** Keywords ***
Go to Google
Open Browser https://google.com Firefox
Maximize Browser Window
下面是我得到的日志。
05:40:32.935 INFO Opening browser 'Firefox&
如何删除空格并将robotframework中字符串中的每个第一个字母大写,以便稍后在Selenium库调用中使用结果?
测试解锁服务帐户:
Open Browser ${URL} ${Browser}
${string_1} = get text ${question_1}
${temp_answer} = set variable ${string_1}.title()
${answer}= evaluate ${string_1}.replace(" ","")
Input Text
我在Selenium2Library中使用了robotframework。我在处理IE8中的弹出窗口时遇到了一些麻烦。
Try Popup
Open Browser To PageXYZ
Click Element XYZ
Select Window name=POPUPXYZ
Page Should Contain X
Page Should Contain Y
Page Should Contain Z
Close Window
Get Window Identifiers
我在“关闭窗口”后使用的任何命令都失败了,并
我不能理解如何将我的robotframework脚本设置为在google上进行简单的搜索。
这是我的脚本:
*** Settings ***
Documentation This is a basic test
Library Selenium2Library
*** Variables ***
${url} https://www.google
我面临一个问题,测试一个简单的调查html页面创建的自我学习的目的,基于。当我试图检查输入字段是否使用Element text should be关键字填充时,它经常抛出一个错误The text of element 'id=name' should have been 'Test Name' but it was '',但是在测试期间完成的selenium屏幕截图显示输入的文本是正确的。
为了调试一个问题,我注释了大部分代码,并尝试只对一个输入字段进行测试。
survey.html
<!DOCTYPE html>
<
编辑器骑行不显示关键字的帮助示例控制台中的"Open browser“是一条错误消息:
"Adding keyword 'click_element' to library 'Selenium2Library' failed: Calling dynamic method 'get_keyword_arguments' failed: Return value must be list of strings.
Adding keyword 'wait_until_page_contains' to library
我在RobotFram中创建了这个脚本
*** Settings ***
Documentation This is a basic test for Linkedin Login
Library Selenium2Library
*** Variables ***
${Browser} chrome
${SiteUrl} https://www.linkedin.com/
${username} xpath=//*[@id="login-email"]
出于某些我不能理解的原因,我的测试用例在Firefox上失败,但在Chrome上成功执行。
例如,这个简单的测试用例在Chrome上执行得很好,但在Firefox上就会失败:
*** Settings ***
Documentation This is some test sample login test
Library Selenium2Library
Resource ../Resources/common_resources.robot
Resource ../Resources/users.robot
*** Test Cases ***
Test Robot Framew
我是机器人框架的新手,我一直在尝试运行这个脚本。
*** Settings ***
Library SeleniumLibrary run_on_failure=Nothing
Test Setup Open Browser And Go To Page
Test Teardown Close Browser
*** Variables ***
${FORM_URL} https://www.google.com/
${BROWSER} headles
我在测试一家网店。有很多文章和描述的页面。我必须找到所有的文章与一个无效的描述。如何让它成为一个单一的页面是很清楚的。如何在不同的页面中找到相同的元素? 下面是单个文章页面的testCase: [Setup] Log To Console TestCase Beschreibung gestartet
Open Browser ${url_test} ${BROWSER}
Page Should Contain Element xpath=/html/body/div[4]/section/div/div/div/div[2]/div[2]/div[1]/div[
Robotframework支持所描述的“嵌套变量”。
我尝试过多种方法,但没有找到将新值赋给嵌套变量的方法。看看这个示例,它甚至没有在红色编辑器中进行验证,在执行时会显示以下错误消息:
未找到名为‘${VAR_${嵌套}_VALUE}=’的关键字。
*** Variables ***
${VAR_A_VALUE}= aValue
*** Test Cases ***
I Got Stuck Here
Should Be Equal aValue ${VAR_A_VALUE}
${nested}= Set Variable A
Should Be
在运行测试用例时,如果我的测试程序试图启动firefox,我就会出错。我正在使用robotframework、Selenium2Library和python2.7。
1Login [ WARN ] Keyword 'Capture Page Screenshot' could not be run on failure: No browser is open
| FAIL |
WebDriverException: Message: 'The browser appears to have exited before we could connect. The ou
退出代码:在RobotFramework中使用ssh在远程服务器中执行命令时返回255,127。该命令不是内置命令,而是提供了绝对路径。
*** Test Cases ***
open_connection_and_login
Open Connection ${HOST}
Login ${USERNAME} ${PASSWORD}
${res}= Execute Commmand cmd test.qoc
log to console ${res}
Close All Connections
cmd是一个没有内置shell命令的命令。
我是RobotFrameWork新手,我目前正在设置我的机器上的所有东西,以便能够在一些测试场景中使用这个工具。
我得到的问题如下:
(venv) C:\Users\aharo\PycharmProjects\Automation>robot Salesforce/Login.robot
[ ERROR ] Error in file 'C:\Users\aharo\PycharmProjects\Automation\Salesforce\Login.robot' on line 4: Importing test library 'Selenium2libra
我是蟒蛇和机器人框架的新手。以前,我使用ruby进行测试,我经常使用以下方法
feature file:
Scenario : User can open browser
User opens browser using "Chrome"
rb file:
And (/^User opens browser using "(.*)" $/) do |browser|{
//open browser step
}
但是当我在python上尝试类似的步骤时
*Keyword*
User opens browser using ${browser}
我正在尝试为机器人框架中的多个变量设置Suite变量(骑乘工具,关键字驱动),使用"AND“条件,但不能。
以下是我的剧本:
Set Suite Variable ${username} AND
${password} AND
${URL} AND
${Browser}
面对错误:
无效的变量语法‘${用户名}和’。
和平执行方案清单:
robotframework 3.1.2
[...]
selenium 3.8.1
请告诉我是否