Launch the browser and open application URL (e.g. google.com)
Once page loads, hit the tab key and verify that the first element in focus is ‘xx’ element
I have used WebUI.sendKeys(findTestObject(‘Object location’), Keys.chord(Keys.TAB)) many times with success. But here I cannot focus on the URL and hit tab
I like @Elly_Tran’s idea of using “switchToWindowIndex(1)”, and then return to the original page, “switchToDefaultContent()”, but I was not able to find any information on the method, getFocusedElement(). Otherwise, I think this would be the easiest way to go about your concern.
Doing something a user would never do is decidedly not cool. And loading another page/window and then switching between them? Terrible idea. Even if you get this to “work”, what is it testing? What does the result even mean? Answer: It works as long as you do weird things no one would ever do.
We would like to share with you that this thread has been chosen by our internal teams to be turned into a blog post on The Katalon Blog. We will share the link to the blog with you shortly.
We have condensed the thread into succinct and informative chunks of information that go over the issues faced by the OP (original poster) and many of the proposed workarounds from other members.
This way, it can help those who are considering using Katalon, or have never been on the forum before, to discover potential solutions from other Katalon users who may be having the same questions/issues as they are.
Note: These blog posts are not intended to offer readers a one-size-fits-all solution to their questions, as we are aware that different machine settings and configurations may lead to different results, but rather to foster further peer-to-peer discussions and collaboration.
Mistakes and inaccuracies are bound to happen with these blog posts. Hence, we encourage you to share your thoughts and feedack in Site Feedback.