I use UI.Vision to automate the generation of ServiceNow tickets. One problem I’m running into is that if I click on the Create New Incident anchor tag, it opens the new incident in a new tab, that tab has focus, but when I try to interact with it, it performs actions on the orignal page. I’ve tried using pause, I’ve tried checking the title of the current page and then manually selecting the next tab, but none of it works consistently. My question is how to I get UI.Vision to interact the active tab?
switch tabs
selectWindow tab=1
selectWindow tab=0
That’s the problem, that doesn’t work in my situation. I don’t know if it is a peculiarity with ServiceNow but even though the new tab is active, has focus, UI.Vision acts as though tab 0 is where it is still operating. I thought maybe there is some time delay in how long it takes to switch but I’ve used pause to delay 6 or 7 seconds and it still treats the original tab as the active one.
can you share code
{
“Command”: “selectWindow”,
“Target”: “tab=1”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “pause”,
“Target”: “1000”,
“Value”: “”,
“Description”: “”
},
{
“Command”: “selectWindow”,
“Target”: “tab=0”,
“Value”: “”,
“Description”: “”
}