I've this use case: - robot and application server(apache+php) installed in a linux remote server - a web page that call robot file.
My robot file (demo.robot):
*** Settings ***
Library Selenium2Library
*** Test Cases ***
Google search
Set Environment Variable webdriver.gecko.driver /home/user/robot/geckodriver
Set Environment Variable webdriver.firefox.bin /home/user/robot/firefox/firefox
Open Browser https://www.google.it firefox
My php file:
<?php
$fff =shell_exec ('export DISPLAY=192.168.178.22:0.0 && export LD_LIBRARY_PATH=/usr/python-3.8.0/lib && export PATH=/usr/python-3.8.0/bin:/home/user/robot/geckodriver:/home/user/robot/firefox:/usr/bin/geckodriver:$PATH && cd /usr/www/httpd/htdocs/enm/ && robot ./demo/demoSuite.robot');
$var = "Esecuzione terminata";
?>
If I run robot file manually from shell it works fine:
robot -d demo/result demo/demo.robot
If I run the robot file from web page, it not works, the page is in a loop state without error. In The geckodriver-1.log there is no error:
1574886675597 mozrunner::runner INFO Running command: "/home/user/robot/firefox/firefox""-marionette""-foreground""-no-remote""-pro
file""/tmp/rust_mozprofileQAxKyX"
Where I wrong?
Thanks a lot