mikej411
9 years agoOccasional Contributor
Solved
How to verify whether a blinking cursor is currently inside of a text box
I am trying to verify that the text box gets the focus (the blinking cursor gets placed inside of it) after a certain action. I tried to use the Focused property, but it does not seem to work, or the...
- 9 years ago
Got it. Everything works now, thank you!
var actualFocusedElement = Sys.Browser().Page("*BC/Report*").contentDocument.activeElement.id if(aqString.Contains(actualElement, "saveDialog_tmpl_sfsName", 0, true)) Log.Message("The blinking cursor is inside of the name text box") else Log.Error("The blinking cursor is not inside of the name text box")
I used the actual focused element's ObjectIdentifier (ID) and compared it against the expected ID, utilizing the activeElement jScript function.