开发者

SELENIUM: how to click on a blank section of webpage

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");

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜