Salesforce 如何在Robot框架中配置cumulusci?
我正在我的组织中进行概念验证,以使用robot框架以及seleniumlibrary和cumulusci来自动化我们基于salesforce的平台。以下是我到目前为止的设置:Salesforce 如何在Robot框架中配置cumulusci?,salesforce,robotframework,Salesforce,Robotframework,我正在我的组织中进行概念验证,以使用robot框架以及seleniumlibrary和cumulusci来自动化我们基于salesforce的平台。以下是我到目前为止的设置: 我在.robot项目文件中添加了cumulusci资源,如下所示: 在套件设置级别导入资源${CURDIR}/cumulusci/robotframework/Salesforce.robot 我还将.robot项目文件放置在以下位置: ${CURDIR}/cumulusci/tests/MyProjectFile.rob
*** Test Cases ***
TestSample
Salesforce.Click Object Button <mybuttonstitle>
***测试用例***
测试样本
Salesforce。单击“对象”按钮
我得到:
找不到名为“Salesforce.Click Modal Button”的关键字
我的推荐人:
寻找有关cci设置、访问关键字或任何其他方面的帮助,你们觉得我在cci rfw方面缺少这些
谢谢。我相信,您错过了Salesforce库的导入
*** Settings ***
Resource cumulusci/robotframework/Salesforce.robot
另外,如果必要,请确保已经安装了Python软件包。感谢您的帮助Bryan和KJ。实际问题是我创建的文件夹结构不正确。当我解决这个问题时,我的积云关键词开始起作用。这就是我所说的: 机器人 MyAppTestCases.robot 机器人
这是您的实际测试用例吗,与问题中的描述完全一致?如果是这样,它应该给出一个与您报告的错误完全不同的错误。请确保您报告的错误确实是您的错误造成的。这仍然是一个问题吗?请用更多信息更新您的问题,或者如果不再需要帮助,请关闭问题?
*** Keywords ***
Call all python libraries and resources
import library SeleniumLibrary timeout=20
import library OperatingSystem
import resource C:/Python37/Lib/site-packages/cumulusci/robotframework/Keywords/CommonKeywords.robot
import resource C:/Python37/Lib/site-packages/cumulusci/robotframework/Salesforce.robot
import resource C:/Python37/Lib/site-packages/cumulusci/robotframework/CommonVariables.robot
*** Settings ***
Resource C:/Python37/Lib/site-packages/cumulusci/robotframework/CommonEnvironment.robot
Suite Setup Call all python libraries and resources
Test Setup Setup Browser
Test Teardown End Session
*** Test Cases ***
Verify so and so
Login to Salesforce
Launch My App
*** Keywords ***
Login to Salesforce
Wait Until Page Contains Element ${signOn_username}
Input Text ${signOn_username} ${Username}
Wait Until Page Contains Element ${signOn_password}
Input Text ${signOn_password} ${Password}
Click Element ${loginButton}
${Pass}= RUN KEYWORD AND RETURN STATUS Wait Until Page Contains Element' ${MostRecentlyViewed}
run keyword if '${Pass}'=='True' Log "SF Home page loaded successfully"
... ELSE Fail "SF Home page did not load successfully"
Launch My App
Open App Launcher # this is the cumulusci keyword - and it works well now!
Select App Launcher App MyApp
...