1

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.

dejanualex
  • 3,872
  • 6
  • 22
  • 37
john tran
  • 11
  • 1

1 Answers1

1

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>
Adrian Theodorescu
  • 11,664
  • 2
  • 23
  • 30