Simulate TAB keypress event in Selenium RC

前端 未结 5 1094
滥情空心
滥情空心 2021-02-07 08:10

I need to simulate a tab keypress in Selenium RC, using the Java API.

I do this after having entered some text using:

selenium.type(input, \"mytext\");
<         


        
5条回答
  •  生来不讨喜
    2021-02-07 09:03

    Some functions may used Onblur. It will trigger the function when the field lose the key focus. here we can use fireEvent with "blur" or "focus" command as follows: command: fireEvent target: id=your_field_identification value: blur

    Reference: http://qaselenium.blogspot.com/2011/01/how-to-triger-tab-key-in-selenium.html

提交回复
热议问题