Skip to content

Instantly share code, notes, and snippets.

@basilevs
Created October 23, 2024 10:27
Show Gist options
  • Save basilevs/092e81b4d224b3f9c649ae1a9dbc5bce to your computer and use it in GitHub Desktop.
Save basilevs/092e81b4d224b3f9c649ae1a9dbc5bce to your computer and use it in GitHub Desktop.
Jenkins auto-login
// ==UserScript==
// @name Jenkins auto-login
// @version 1
// @match https://jenkins-itest.spirenteng.com/jenkins/*
// @match https://ci.eclipse.org/*
// @grant none
// ==/UserScript==
function findSingleNode(query) {
const buttons = document.evaluate(query, document, null, XPathResult.FIRST_ORDERED_NODE_TYPE);
const node = buttons.singleNodeValue
return node;
}
findSingleNode('/html/body/header/div/a[text()="log in"]')?.click()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment