Ruby - Cheatsheet: Revision history

Jump to navigation Jump to search

Diff selection: Mark the radio buttons of the revisions to compare and hit enter or the button at the bottom.
Legend: (cur) = difference with latest revision, (prev) = difference with preceding revision, m = minor edit.

4 April 2025

  • curprev 21:4721:47, 4 April 2025 Gregpaskal talk contribs 1,886 bytes +1,886 Created page with "{{: Header_Nav}} # This ruby script uses JavaScript to grab the URL from the browser and return it to Ruby lo_js_universal = 'return window.location.pathname' myurl = @driver.execute_script(lo_js_universal) puts "===== Here is the window.location.pathname: #{myurl} =====" # Ruby - JavaScript - XPath - Capture value lo_js_universal = '//input[@name=\"campaign_id\"]' js_universal = "return document.evaluate(`#{lo_js_universal}`, document, null, XPathResult.FIRST_OR..."