2gis / Winium.Desktop

Winium.Desktop is Selenium Remote WebDriver implementation for automated testing of Windows application based on WinFroms and WPF platforms.
Mozilla Public License 2.0
402 stars 140 forks source link

SendKeys to textbox wpf #72

Open PetrZatloukal opened 8 years ago

PetrZatloukal commented 8 years ago

Hi,

I created simple wpf application. I only put two textboxes to mainwindow and set their Name property. Now I would like to create test method and over Winium set Text to these two textboxes. I used element1 = driver.FindElementById("tb1.Name") and then element1.SendKeys("Anytext") - this work well. But when I want to do same with second textbox element2 = driver.FindElementById("tb2.Name") and then element2.SendKeys("Anytext"), text is inputed into first textbox instead of second texbox. Do you have idea what can be wrong? We tested this two people over different wpf applications but behavior is same. Thanks a lot for any help. Petr

skyline-gleb commented 7 years ago

@PetrZatloukal Hi! I have no idea what happens. Needed more info about run - stdout, elements info, etc

ahsanixc commented 7 years ago

Hi @PetrZatloukal ! i recommend you to please use UIspy.exe to loacte elementID or by classname automationID in UIspy is elementID for example driver.findElementById("328652").click(); would be used to click.

Link to UIspy.exe https://raw.githubusercontent.com/TestStack/White/master/tools/UISpy/UISpy.exe

screenshot 53