// I had previously used a CSS/JQuery extractor to get a URL from a page and add it to JMeter vars - accessing it here
var pageURL = "${valueFromJmeterVars}";
// navigate to that url
WDS.browser.get(pageURL);
// selecting an element
var button = wait.until(pkg.ExpectedConditions.visibilityOfElementLocated(pkg.By.cssSelector(buttonLocator)));
// log desired boolean value to console, so I can confirm is as expected
WDS.log.info('reserveASpotButton:' + reserveASpotButton.isEnabled());
// add my boolean to JMeter vars, so I can access later from beanshell post-processor (where I do my assertions)
vars.put("reserveASpotButtonIsEnabled", reserveASpotButton.isEnabled());
上記の最後の行は機能しません。
CSS/JQuery Extractor を使用して、JMeter 変数に値を追加できます...
しかし、WebDriver Sampler 内から同じことを行うにはどうすればよいでしょうか?