WebUI Firefox SendKeys Method Not Working For "Backspace" Key


#1

The expected behavior I want to see is the deletion of the last character in a textbox. I’m running into a problem in Firefox where the SendKeys method deletes the character as expected, but leaves a box symbol in its place at the end like so:

This does not occur when I use Chrome. This is the code I use to send the “backspace” key:

WebUI.click(findTestObject(testObjectPath))

WebUI.sendKeys(findTestObject(testObjectPath), Keys.chord(Keys.BACK_SPACE))

If anyone knows how to deal with this issue it would be greatly appreciated. Thanks!

Screen Shot 2018-07-11 at 10.22.38 AM.png

Screen Shot 2018-07-11 at 10.23.05 AM.png


#2

Jeremy Lipschutz said:

The expected behavior I want to see is the deletion of the last character in a textbox. I’m running into a problem in Firefox where the SendKeys method deletes the character as expected, but leaves a box symbol in its place at the end like so:

This does not occur when I use Chrome. This is the code I use to send the “backspace” key:

WebUI.click(findTestObject(testObjectPath))

WebUI.sendKeys(findTestObject(testObjectPath), Keys.chord(Keys.BACK_SPACE))

If anyone knows how to deal with this issue it would be greatly appreciated. Thanks!

Are you trying to delete the odd character generated when you send the enter key?


#3

No, I just want the last character deleted. The expected output for those text boxes should be “Seattl” and “9810”, but in Firefox they are those images above.


#4

Anthony said:

Jeremy Lipschutz said:

The expected behavior I want to see is the deletion of the last character in a textbox. I’m running into a problem in Firefox where the SendKeys method deletes the character as expected, but leaves a box symbol in its place at the end like so:

This does not occur when I use Chrome. This is the code I use to send the “backspace” key:

WebUI.click(findTestObject(testObjectPath))

WebUI.sendKeys(findTestObject(testObjectPath), Keys.chord(Keys.BACK_SPACE))

If anyone knows how to deal with this issue it would be greatly appreciated. Thanks!

Are you trying to delete the odd character generated when you send the enter key?

No, I just want the last character deleted. The expected output for those text boxes should be “Seattl” and “9810”, but in Firefox they are those images above.


#5

Jeremy Lipschutz said:

No, I just want the last character deleted. The expected output for those text boxes should be “Seattl” and “9810”, but in Firefox they are those images above.

Ah I got those Unicode sort of characters when I was using Katalon to press ENTER, anyway using robot to press Backspace might do it for you

https://forum.katalon.com/discussion/6800/how-to-press-enter-with-webui <- see first response and change enter to back space


#6

Any solution for above problem