I have a search textbox, which has some default text "search your item" visible in it. Once you click on the search box to enter any word, the default text disappears and the word is typed.
Now, if the word inside the search box is deleted and then you click on any place on the blank part of the page, then the default text appears.
I would like to simulate this using selenium. I am able to delete the word from the search box, but after deleting the word, how do i click on any blank p开发者_Python百科art of the page so that the default text is visible again?
thanks for the help in advance.
Simply use the code:
selenium.FireEvent("//id of the text box","blur");
精彩评论