首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在一个测试对象中输入数据会在katalon studio中的另一个测试对象上输入值。

在一个测试对象中输入数据会在katalon studio中的另一个测试对象上输入值。
EN

Stack Overflow用户
提问于 2019-05-14 13:02:45
回答 1查看 46关注 0票数 0

我正在尝试在表单中输入值。但是在一个测试对象中输入值将执行另一个测试对象中的值。例如,在input_Phone_form-control中输入"3213213“,在input_Location_form-control中输入值

下面是生成的

脚本:

代码语言:javascript
复制
WebUI.openBrowser('')

WebUI.navigateToUrl('https://api-dev-new.eeposit.com/openseed/#/')

WebUI.setText(findTestObject('Object Repository/Page_Open Seed/input_LOG IN_form-control'), 'info@eeposit.com')

WebUI.setEncryptedText(findTestObject('Page_Open Seed/input_LOG IN_form-control'), '9G0Ij+ZUwmw=')

WebUI.click(findTestObject('Page_Open Seed/button_LOG IN'), FailureHandling.STOP_ON_FAILURE)

WebUI.click(findTestObject('Object Repository/Page_Open Seed/button_Add New Company'))

WebUI.setText(findTestObject('Object Repository/Page_Open Seed/input_Company Name_form-control'), 'company private limited')

WebUI.setText(findTestObject('Page_Open Seed/input_Location_form-control'), 'Florida')

WebUI.setText(findTestObject('Page_Open Seed/input_Phone_form-control'), '3213213')

WebUI.setText(findTestObject('Page_Open Seed/input_Email_form-control'), 'test@email.com' )

WebUI.click(findTestObject('Object Repository/Page_Open Seed/button_Save Company'))
EN

回答 1

Stack Overflow用户

发布于 2019-05-14 17:01:31

当多个UI元素具有相同的标识符时,就会发生这种情况。您需要检查input_Phone_form-control和input_Location_form-control对象并设置Detect object by选项。

票数 0
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/56123302

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档