Skip to content

Instantly share code, notes, and snippets.

@yarres
yarres / basic-webdriver-sampler.groovy
Created August 19, 2019 14:43
Basic chrome webdriver (Selenium) script for JMeter in Groovy
import org.openqa.selenium.By;
import org.openqa.selenium.support.ui.WebDriverWait;
import org.openqa.selenium.chrome.ChromeDriverService;
import org.openqa.selenium.remote.DesiredCapabilities;
import org.openqa.selenium.remote.RemoteWebDriver;
import static org.openqa.selenium.support.ui.ExpectedConditions.*
import org.openqa.selenium.support.ui.*;
import openqa.selenium.OutputType.*;
// Required to start counting time which will get reported at the end of this code.
@yarres
yarres / gist:f1e3a75dbd8e8010a4b77aa80340b7b3
Created April 2, 2017 16:51
hedonism_model_experiment
class Experience {
/**
* Epxerience is defined by pain and pleausure. We take into account the quality
* of the pleasure experiences, following J.S. Mill
* @param {Number} pain [description]
* @param {Number} pleasureQuantity [description]
* @param {Number} pleasureQuality [description]
* @return {Object}
*/
constructor(pain, pleasureQuantity, pleasureQuality) {