我无法为下面的代码创建YAML文件作为红叉 正在显示变量,因此我无法采取进一步措施。
---
variables:
'URL':"https://www.amazon.in/"
webelements:
'SIGN_IN': 'xpath = .//*[@id='nav-link-yourAccount']'
'Email_or_mobile': 'xpath = .//*[@id='ap_email']'
'Password': 'xpath = .//*[@id='ap_password']'
'login_button': 'xpath = .//*[@id='signInSubmit']'
[1]: https://i.stack.imgur.com/PPnBp.png
答案 0 :(得分:0)
文件中有两个错误:
:
)'URL':"https....
后没有空格
纠正YAML:
variables:
'URL': "https://www.amazon.in/"
webelements:
'SIGN_IN': "xpath = .//*[@id='nav-link-yourAccount']"
'Email_or_mobile': "xpath = .//*[@id='ap_email']"
'Password': "xpath = .//*[@id='ap_password']"
'login_button': "xpath = .//*[@id='signInSubmit']"