coffee
9 years agoContributor
Emulating Keyboard [Tab] for webpage
Hi,
I have a webpage with 3 input text boxes.
User can put some string to the first text box and then hit [Tab] on the keyboard to jump to the second text box, put some string and then hit [Tab] again on the keyboard to jump to the third text box.
I am wondering how TC can do this.
I found this article https://support.smartbear.com/viewarticle/80629/ , but unfortunately this only applies to Desktop and Sys objects which I understand that it won't work with webpage objects (web testing).
Anyway I just tried it
var textbox1 = page.QuerySelector("input[type='text']"); //OK textbox1.Click(); //OK
textbox1.value= "Hello"; //OK aqUtils.Delay(5000); textbox1.Keys("[Tab]"); //TypeError textbox1.Keys is not a function
Thank You