Selenium: delete contents from a textbox

后端 未结 5 1309
囚心锁ツ
囚心锁ツ 2021-02-07 11:41

Through selenium. how to delete contents from textbox.

I have to delete the last 2 characters from text box using selenium command.

Ex.ABCD to AB.

5条回答
  •  长发绾君心
    2021-02-07 12:19

    Try this -

    selenium.type("text_box_object", "ABCD");
    selenium.typeKeys("text_box_object", "\b");
    selenium.typeKeys("text_box_object", "\b");
    

提交回复
热议问题