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

脚本:
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'))发布于 2019-05-14 17:01:31
当多个UI元素具有相同的标识符时,就会发生这种情况。您需要检查input_Phone_form-control和input_Location_form-control对象并设置Detect object by选项。

https://stackoverflow.com/questions/56123302
复制相似问题