Winium.Desktop icon indicating copy to clipboard operation
Winium.Desktop copied to clipboard

Winium not typing text in TextBox Properly - Windows 10

Open bhaskaralluri opened this issue 5 years ago • 3 comments

Here i am attaching 3 Screen shots. Please look at the application in the screen shots you can easily understand the flow. I am giving my automation code below. ID's,Names are correct no issue in that. Problem comes on the window where i have text boxes ( First Name, Last Name etc), In case on that window if i click enter manually in the text box then winium typing correctly otherwise, i just see some mouse movement on the app and does some weird things like...complete erasing my java code and type text in that etc....Not sure about the issue, I am new to winium hence practicing to see if it works or not for us. By Googling on this topic i got to know that these is some display scaling issue on windows 10 machine, is this the reason ? I do not see any element not found exceptions on console.

WiniumDriver driver; WiniumDriverService service; DesktopOptions options;

@BeforeClass
public void Start() throws IOException{
	
	options = new DesktopOptions();
	options.setApplicationPath("C:\\Users\\T1890\\Downloads\\TicketSystem\\Demo.exe");
	File driverPath = new File("C:\\Users\\T1890\\Downloads\\Winium.Desktop.Driver\\Winium.Desktop.Driver.exe");
	service = new WiniumDriverService.Builder().usingDriverExecutable(driverPath).usingPort(9999).withVerbose(true).withSilent(false).buildDesktopService();
	service.start();
}

@Test
public void Processing() throws InterruptedException{
	driver = new WiniumDriver(service,options);
	Thread.sleep(1000);
	driver.findElement(By.name("Ticket")).click();
	//Thread.sleep(1000);
	driver.findElement(By.name("Create New")).click();
	Thread.sleep(5000);
	

	//driver.findElement(By.id("TextBox1")).click();
	driver.findElement(By.id("TextBox1")).sendKeys("dasdsad"); <--- This is not happening
	//Thread.sleep(2000);
	
	driver.findElement(By.id("TextBox2")).sendKeys("xxxxxxx");
	driver.findElement(By.id("RadioButton1")).click();
	//driver.findElement(By.id("1001")).click();
	driver.findElement(By.id("TextBox3")).sendKeys("Test");
	
	driver.findElement(By.id("btnSubmit")).click();
}
ctt-1 ctt-2 ctt-3

bhaskaralluri avatar Aug 27 '18 00:08 bhaskaralluri

display scale is 100%? image

are you finding element in your application window? element with TextBlock1 can be also in another applications. driver.findElement(By.id("yourApplicationMainWindowIdWhereAllElementsIsPresent"))findElement(By.id("TextBox1")).sendKeys("dasdsad");

heilwood avatar Oct 10 '18 06:10 heilwood

I am also facing the same issue. any solution?

venkatesh143293 avatar May 10 '21 14:05 venkatesh143293

Been 4 years, no solution (WONDERFUL)

ProfoundPenguin avatar Dec 14 '22 05:12 ProfoundPenguin