To access and test Stripe.js Element objects with Capybara, try the following: card_frame = page.evaluate_script("$(\"iframe[src*='fieldName']\").attr(\"name\")") within_frame card_frame do   find(".InputElement").set("value") end Where fieldName is the name of the Stripe.js Element, for example ‘cardNumber’, and the value is whatever you would like to set the field value to (e.g. 4242 4242 4242 4242) Note, you may need to wait for the Stripe elements to load, depending on your implementation.
Read More
GitHub will occasionally hide the Diff for various files in your pull requests (PRs). During a large review, this can get a little annoying. I wanted to avoid installing an extension to solve the problem, so this code will open each of the “Load Diff” areas automatically from the console: for(i=0; i‹document.getElementsByClassName(“js-button-text”).length; i++){ document.getElementsByClassName(“js-button-text”)[i].click();}
Read More