hi,
i'm trying to use the web monitoring system, based on selenium webdriver.
The learning course is not that simple, the web driver system, although obvious in the purpose, is quite heavy to handle.
The web_driver template and the podman selenium help us to have a good quick start with it, simplifying the deployment of the solution.
However, we obtain a system with different layers (zabbix and java variables, template and java script, podman, selenium and the webdriver).
My trouble is: what's the best convention to add functionnality to the current template?
An exemple: i need to monitor datas from a web site... it's specific and the maker of the system didn't used normalized system as snmp or others => the web monitoring system is the solution.
But, the browser is in en_EN... i need to give the browser another country code.
I'm strugling to give the country parameter to the browser... the best would be to have options directly in the template (for language, for certificate , for accept cookie...)
If the template wouldn't evolve, the other way could be to code it in js. Unfortunately, i didn't manage to give the parameters in the javascript of the Website {$WEBSITE.DOMAIN} Get data element of the template.
Looking for this kind of request, a options.addArguments('--lang=xx_XX''); should be used... (with xx_XX en_EN for englis, fr_FR for french, de_DE for german...)
Same response for bypassing certificates error : options.addArguments('--ignore-certificate-errors'); should be used.
i'm sorry about that, but my attempts to implement it directly in the js script, even without adding a parameter in the script (directly in the java code) has failed.
I don't know if i'ts possible, the way to give the parameters in this template, if it could work...
I'm not accustomed to js syntax, i'm pretty sure my troubles comes from lack of understanding the passing and modifying of parameters in the JS
getOptions(browser) {
switch ((browser || '').trim().toLowerCase()) {
case 'firefox':
return Browser.firefoxOptions();
case 'safari':
return Browser.safariOptions();
case 'edge':
return Browser.edgeOptions();
default:
//trying to add parameters for the chrome browser
browser.chromeOptions.addArguments('--lang=fr_FR');
//maybe other parameters to modify
return Browser.chromeOptions();
}
},
Any help would be appreciated
i'm trying to use the web monitoring system, based on selenium webdriver.
The learning course is not that simple, the web driver system, although obvious in the purpose, is quite heavy to handle.
The web_driver template and the podman selenium help us to have a good quick start with it, simplifying the deployment of the solution.
However, we obtain a system with different layers (zabbix and java variables, template and java script, podman, selenium and the webdriver).
My trouble is: what's the best convention to add functionnality to the current template?
An exemple: i need to monitor datas from a web site... it's specific and the maker of the system didn't used normalized system as snmp or others => the web monitoring system is the solution.
But, the browser is in en_EN... i need to give the browser another country code.
I'm strugling to give the country parameter to the browser... the best would be to have options directly in the template (for language, for certificate , for accept cookie...)
If the template wouldn't evolve, the other way could be to code it in js. Unfortunately, i didn't manage to give the parameters in the javascript of the Website {$WEBSITE.DOMAIN} Get data element of the template.
Looking for this kind of request, a options.addArguments('--lang=xx_XX''); should be used... (with xx_XX en_EN for englis, fr_FR for french, de_DE for german...)
Same response for bypassing certificates error : options.addArguments('--ignore-certificate-errors'); should be used.
i'm sorry about that, but my attempts to implement it directly in the js script, even without adding a parameter in the script (directly in the java code) has failed.
I don't know if i'ts possible, the way to give the parameters in this template, if it could work...
I'm not accustomed to js syntax, i'm pretty sure my troubles comes from lack of understanding the passing and modifying of parameters in the JS
getOptions(browser) {
switch ((browser || '').trim().toLowerCase()) {
case 'firefox':
return Browser.firefoxOptions();
case 'safari':
return Browser.safariOptions();
case 'edge':
return Browser.edgeOptions();
default:
//trying to add parameters for the chrome browser
browser.chromeOptions.addArguments('--lang=fr_FR');
//maybe other parameters to modify
return Browser.chromeOptions();
}
},
Any help would be appreciated
Comment