Opentest Backspace issue

84 Views Asked by At

I have done the below steps:

  1. I have entered promoCode test
  2. Clear the promo Code
  3. Enter another promoCode abc

I have problems with Step 2, I tried to use SendKeys with Backpace \u0008 or Keys.BACKSPACE but did not work.

description: Type "backspace" in the search box action: org.getopentest.selenium.SendKeys args: locator: { id: promoCode } text: "\u0008" sendEnter: true

Thank you.

1

There are 1 best solutions below

0
On

Try using the clearContent argument, which will clear the text box before typing in the new text:

- description: Type new text in the search box
  action: org.getopentest.selenium.SendKeys
  args:
    locator: { id: promoCode }
    clearContent: true
    text: <NEW TEXT HERE>