WatiN pressTab does not press tab

Has anyone found a tool to click the watiN tab in Internet Explorer?

+2


source to share


2 answers


Do you want you to press the tab key yourself, or just click on the HTML element that looks like a tab? For the latter, use the Click method on the corresponding element (Div, Span, etc.). Otherwise, you can try SendKeys instead of PressTab. eg:.

IE ie = new IE("http://www.google.com");
ie.AutoClose = false;
ie.TextField(Find.ByName("q")).Click();
SendKeys.SendWait("{TAB}");

      



The above example will highlight the focus of the text box and then open the tab by clicking the search button.

+5


source


we had the same problem, we allow it to focus on the browser and use SendMessage (Win) for a specific hwnd.



0


source







All Articles