I am using jp@gc - Firefox Driver Config plugin to hit some URL and assert some element in UI. But I am not able to launch firefox driver as I cant see an option to enable to run firefox as a headless browser .
JP@GC - WebDriver Sampler:
import org.openqa.selenium.By; import org.openqa.selenium.support.ui.ExpectedConditions; import org.openqa.selenium.support.ui.WebDriverWait
def wait = new WebDriverWait(WDS.browser,5000);
WDS.sampleResult.sampleStart(); WDS.browser.get('https://google.com/'); wait.until(ExpectedConditions.visibilityOfElementLocated(By.xpath(".//input[@name='q']"))); WDS.sampleResult.sampleEnd()
How about checking
Headless
box in the jp@gc - Firefox Driver Config?Going forward be aware that you can always bypass any JMeter limitation by implementing whatever you want/need using JSR223 Test Elements and Groovy language, example code to kick off a headless Firefox would be something like:
More information on Groovy scripting in JMeter: Apache Groovy - Why and How You Should Use It