Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP

Comparing changes

Choose two branches to see what's changed or to start a new pull request. If you need to, you can also compare across forks.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also compare across forks.
base fork: thoughtbot/capybara-webkit
...
head fork: IdeaMarshal/capybara-webkit
Checking mergeability… Don't worry, you can still create the pull request.
  • 1 commit
  • 1 file changed
  • 0 commit comments
  • 1 contributor
Showing with 13 additions and 0 deletions.
  1. +13 −0 src/capybara.js
View
13 src/capybara.js
@@ -135,6 +135,19 @@ Capybara = {
this.nodes[index].dispatchEvent(eventObject);
},
+ keydown: function(index, altKey, ctrlKey, shiftKey, metaKey, keyCode, charCode) {
+ var eventObject = document.createEvent("Events");
+ eventObject.initEvent('keydown', true, true);
+ eventObject.window = window;
+ eventObject.altKey = altKey;
+ eventObject.ctrlKey = ctrlKey;
+ eventObject.shiftKey = shiftKey;
+ eventObject.metaKey = metaKey;
+ eventObject.keyCode = keyCode;
+ eventObject.charCode = charCode;
+ this.nodes[index].dispatchEvent(eventObject);
+ },
+
visible: function (index) {
var element = this.nodes[index];
while (element) {

No commit comments for this range

Something went wrong with that request. Please try again.