Full story: http://code.google.com/p/selenium/issues/detail?id=955
Action: The bug is fixed in trunk, but not released yet, follow comment 6 to get the update from trunk.
I am working on the testing our new web-based translation management system, flies with selenium.
I used to stuck on emulating the key combination handling, such as Ctrl-Enter until recently. Here are steps to emulate a Ctrl-Enter.
The “theElement” is the web element that you want your hot keys to be press on. Yes, you need all keyDown, keyPress, and keyUp events.
Note that PageUp and PageDown might not be working. As their keycodes seems to collide with
According to selenium’s web site, CSS locator is not only powerful, but also fast.
But despite of that, I was hesitated and kept using xpath, mainly because I hadn’t had idea about how to search by innertext.
Until yesterday, I find that the pseudo class :contains() suit my need. Even better, it supports regex, yay!
But the main push is that XPath is incapable of dealing with certain tags, such as <span>, <label>.
So CSS, here I come!
I am testing a web application with selenium.
Some buttons of the web app are rendered with GWT 2.0, they cannot be clicked by “click” command.
There are other pages that describe and address this problem, such as:
Selenium Testing of GWT 2.0 and
Simulating clicks on GWT push buttons with Selenium RC.
Nevertheless, when I was also pondering this problem, an old GUI technique came to my mind. You can “simulate” mouse click by pressing tab until the target widget get focus, then press
Enter to activate that widget. Similarly, you can press Enter on the web element by
Where 13 is ASCII for