I want selenium to open page and wait for keypress, based on key pressed script should do different actions. It seems there is no Expected Conditions for this case, how can I write my own?
Here is pseudo code:
driver.get('http://google.com')
# wait for keypress
# if keypress == ARROW_RIGHT:
# print "ARROW_RIGHT"
# elif keypress == ARROW_LEFT:
# print "ARROW_LEFT"