[英]Katalon Export - Robot Framework Issue
Hi I have exported the below test case from Katalon recorder to Robot Framework code.I am trying to run this in PyCharm or RIDE using Python 2.7. 嗨,我已经将下面的测试用例从Katalon记录器导出到了Robot Framework代码中,我正在尝试使用Python 2.7在PyCharm或RIDE中运行它。 PyCharm and RIDE both seem to not like the Resource seleniumLibrary.robot code.
PyCharm和RIDE似乎都不喜欢Resource seleniumLibrary.robot代码。
How can I import this seleniumLibrary.robot file? 如何导入此seleniumLibrary.robot文件? Where is it?
它在哪里? I have downloaded Robot Framework, SeleniumLibrary, Selenium2Library, WxPython, and RIDE and all are working now I am just trying to get this code to run.
我已经下载了Robot Framework,SeleniumLibrary,Selenium2Library,WxPython和RIDE,并且它们都在工作,现在我只是想让此代码运行。
I followed the instructions below to get up and running 我按照以下说明进行操作
http://seleniummaster.com/sitecontent/index.php/selenium-robot-framework-menu/selenium-robot-framework-python-menu/191-selenium-robot-framework-installation-with-python http://seleniummaster.com/sitecontent/index.php/selenium-robot-framework-menu/selenium-robot-framework-python-menu/191-selenium-robot-framework-installation-with-python
*** Settings ***
Suite Setup Open Browser https://www.katalon.com/ firefox
Suite Teardown Close Browser
Resource seleniumLibrary.robot
*** Variables ***
${undefined} https://www.katalon.com/
*** Test Cases ***
Test Case
open https://abcxyz.com/catalog-portal/
click xpath=//div[5]/div/div[2]/img
selectWindow win_ser_1
selectFrame index=0
click xpath=//td[@onclick="if (warnUnfinishedPage()) return false; changePage('pc.quote.html.QuoteSummarySection','refresh'); return false;"]
click xpath=(.//*[normalize-space(text()) and normalize-space(.)='Email'])[1]/following::td[5]
type name=t1st__TBOX 603449
click xpath=(.//*[normalize-space(text()) and normalize-space(.)='All'])[2]/following::input[1]
click link=Q603449
click link=Email
addSelection id=null Doe, John (abc@abc.com)
click xpath=(.//*[normalize-space(text()) and normalize-space(.)='Email this Quote'])[1]/following::input[2]
select name=FORMAT Text
click link=Send
close win_ser_1
selectWindow win_ser_local
close win_ser_local
The settings and variables sections are mostly placeholders. 设置和变量部分主要是占位符。 You should customize these to be compatible with the development environment you have created.
您应该自定义这些属性以使其与您创建的开发环境兼容。
In this case the resource file seleniumLibrary.robot needs to be created in the Resources folder of your project. 在这种情况下,需要在项目的Resources文件夹中创建资源文件seleniumLibrary.robot 。
EXAMPLE FOR COMPLETELY NEW PROJECT: 全新项目示例:
Try to remove that resource line in the code and change it to Library Selenium2Library. 尝试在代码中删除该资源行,并将其更改为Library Selenium2Library。 I think the issue is that katalon studio is generating a code that uses seleniumlibrary.
我认为问题在于katalon studio正在生成使用seleniumlibrary的代码。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.