我正在尝试模拟应创建的按键,然后保存新记录。 当我运行测试时,UFT只是运行命令而不执行任何操作或显示任何错误。
'to simulate keystrokes
Dim objKeys
Set objKeys = CreateObject("wscript.shell")
'Go to tab FB
Browser("Home:").Page("Home:").WebElement("tab_FB").Click
'go to FB list
Browser("Home:").Page("Home:").WebElement("FB_List").Click
Browser("My Feedback").Page("My Feedback").WebElement("WebElement").Click
wait 10
'Using keystroke to create new Record [CTRL+n]
objKeys.SendKeys "^({n})"
'Saving the new Record [CTRL+SHIFT+s]
Wait 2
objKeys.SendKeys "^(+({s}))"
wait 5
'Show new record id
fb = Browser("Home:").Page("Home:").Link("FB_Number").GetROProperty("innertext")
MsgBox fb
有人可以建议如何解决此问题吗?