mirror of
https://gitlab.sectorq.eu/home/docker-compose.git
synced 2025-09-13 06:10:12 +02:00
alias
This commit is contained in:
27
zabbix-server/webscenario.js
Normal file
27
zabbix-server/webscenario.js
Normal file
@@ -0,0 +1,27 @@
|
||||
var browser, result;
|
||||
var opts = Browser.chromeOptions();
|
||||
opts.capabilities.alwaysMatch['goog:chromeOptions'].args = []
|
||||
browser = new Browser(opts);
|
||||
browser.setScreenSize(Number(1980), Number(1020));
|
||||
|
||||
screens = [];
|
||||
const screenshot = '';
|
||||
const res_value = '';
|
||||
try {
|
||||
var params = JSON.parse(value); // Parse the JSON string containing parameters passed from Zabbix.
|
||||
browser.navigate(params.url);
|
||||
browser.collectPerfEntries();
|
||||
result = browser.getResult();
|
||||
//result.screenshot = browser.getScreenshot();
|
||||
return JSON.stringify(result);
|
||||
}
|
||||
catch (err) {
|
||||
if (!(err instanceof BrowserError)) {
|
||||
browser.setError(err.message);
|
||||
}
|
||||
|
||||
browser.collectPerfEntries();
|
||||
result = browser.getResult();
|
||||
//result.screenshot = browser.getScreenshot();
|
||||
return JSON.stringify(result);
|
||||
}
|
Reference in New Issue
Block a user