Selenium - Open Firefox on Screen with CronHow do I list all cron jobs for all users?firefox not opening - cron, ruby, firewatirHeadless Browser and scraping - solutionsJenkins setup to run selenium ide script using selenium rcFirefox opens up blank when opened with seleniumSelenium-Firefox: Firefox browser crashes when running my Selenium scriptFirefox blank webbrowser with seleniumUsing Selenium, Python script to open Firefox, not going to URL providedOpening Firefox via Selenium in JenkinsHow to open Firefox Developer Edition through Selenium

What is "industrial ethernet"?

How does DC work with natural 20?

How to get Current Module and Full Action Name in ajax controller

Can any NP-Complete Problem be solved using at most polynomial space (but while using exponential time?)

Explain why a line can never intersect a plane in exactly two points.

What does "play with your toy’s toys" mean?

Drawing people along with x and y axis

How to make clear to people I don't want to answer their "Where are you from?" question?

Are all instances of trolls turning to stone ultimately references back to Tolkien?

When to remove insignificant variables?

Why does the Saturn V have standalone inter-stage rings?

Why tighten down in a criss-cross pattern?

Why do all the teams that I have worked with always finish a sprint without completion of all the stories?

Hot coffee brewing solutions for deep woods camping

Do I have to explain the mechanical superiority of the player-character within the fiction of the game?

How do I professionally let my manager know I'll quit over smoking in the office?

What's the difference between a deep fryer and a chip pan?

Why aren't non-isolated DC-DC converters made for high wattage applications?

How much will studying magic in an academy cost?

Who are the remaining King/Queenslayers?

How large would a mega structure have to be to host 1 billion people indefinitely?

Why are < or > required to use /dev/tcp

Can Ogre clerics use Purify Food and Drink on humanoid characters?

LWC - Best practice for routing?



Selenium - Open Firefox on Screen with Cron


How do I list all cron jobs for all users?firefox not opening - cron, ruby, firewatirHeadless Browser and scraping - solutionsJenkins setup to run selenium ide script using selenium rcFirefox opens up blank when opened with seleniumSelenium-Firefox: Firefox browser crashes when running my Selenium scriptFirefox blank webbrowser with seleniumUsing Selenium, Python script to open Firefox, not going to URL providedOpening Firefox via Selenium in JenkinsHow to open Firefox Developer Edition through Selenium






.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty height:90px;width:728px;box-sizing:border-box;








0















My plan is to use selenium to automatically open my AWS CloudWatch Dashboard each morning and close the dashboard in the evening. Thereby, I configured the following cron jobs to open the dashboard at 7 AM and closes it at 7 PM:



0 7 * * 1-5 /home/pi/open_dashboard.sh >/dev/null 2>&1
0 19 * * 1-5 /home/pi/close_dashboard.sh >/dev/null 2>&1


The open_dashboard.sh file looks like the following to enable HDMI and run the selenium python script:



vcgencmd display_power 1 # enable HDMI
export DISPLAY=:0
python3 /home/pi/open_dashboard.py


However, when I try to run the script over the normal console, it works out and the firefox browser is opened. When I run the python script with the cron job, the firefox selenium browser is not shown on my screen. How can I display the firefox browser to the screen by using cron jobs? An example open_dashboard.py may look as the following:



from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
driver.get("https://eu-central-1.console.aws.amazon.com/cloudwatch")
# other steps are omitted to reduce complexity

# no driver.close() because the browser should stay









share|improve this question






















  • Where (what directory) are you running the cron job? You might have to export a PATH variable as well if the shell script is running somewhere that doesn't have access to it, otherwise it won't be able to find your geckodriver which is what opens firefox.

    – C. Peck
    Mar 27 at 1:06

















0















My plan is to use selenium to automatically open my AWS CloudWatch Dashboard each morning and close the dashboard in the evening. Thereby, I configured the following cron jobs to open the dashboard at 7 AM and closes it at 7 PM:



0 7 * * 1-5 /home/pi/open_dashboard.sh >/dev/null 2>&1
0 19 * * 1-5 /home/pi/close_dashboard.sh >/dev/null 2>&1


The open_dashboard.sh file looks like the following to enable HDMI and run the selenium python script:



vcgencmd display_power 1 # enable HDMI
export DISPLAY=:0
python3 /home/pi/open_dashboard.py


However, when I try to run the script over the normal console, it works out and the firefox browser is opened. When I run the python script with the cron job, the firefox selenium browser is not shown on my screen. How can I display the firefox browser to the screen by using cron jobs? An example open_dashboard.py may look as the following:



from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
driver.get("https://eu-central-1.console.aws.amazon.com/cloudwatch")
# other steps are omitted to reduce complexity

# no driver.close() because the browser should stay









share|improve this question






















  • Where (what directory) are you running the cron job? You might have to export a PATH variable as well if the shell script is running somewhere that doesn't have access to it, otherwise it won't be able to find your geckodriver which is what opens firefox.

    – C. Peck
    Mar 27 at 1:06













0












0








0








My plan is to use selenium to automatically open my AWS CloudWatch Dashboard each morning and close the dashboard in the evening. Thereby, I configured the following cron jobs to open the dashboard at 7 AM and closes it at 7 PM:



0 7 * * 1-5 /home/pi/open_dashboard.sh >/dev/null 2>&1
0 19 * * 1-5 /home/pi/close_dashboard.sh >/dev/null 2>&1


The open_dashboard.sh file looks like the following to enable HDMI and run the selenium python script:



vcgencmd display_power 1 # enable HDMI
export DISPLAY=:0
python3 /home/pi/open_dashboard.py


However, when I try to run the script over the normal console, it works out and the firefox browser is opened. When I run the python script with the cron job, the firefox selenium browser is not shown on my screen. How can I display the firefox browser to the screen by using cron jobs? An example open_dashboard.py may look as the following:



from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
driver.get("https://eu-central-1.console.aws.amazon.com/cloudwatch")
# other steps are omitted to reduce complexity

# no driver.close() because the browser should stay









share|improve this question














My plan is to use selenium to automatically open my AWS CloudWatch Dashboard each morning and close the dashboard in the evening. Thereby, I configured the following cron jobs to open the dashboard at 7 AM and closes it at 7 PM:



0 7 * * 1-5 /home/pi/open_dashboard.sh >/dev/null 2>&1
0 19 * * 1-5 /home/pi/close_dashboard.sh >/dev/null 2>&1


The open_dashboard.sh file looks like the following to enable HDMI and run the selenium python script:



vcgencmd display_power 1 # enable HDMI
export DISPLAY=:0
python3 /home/pi/open_dashboard.py


However, when I try to run the script over the normal console, it works out and the firefox browser is opened. When I run the python script with the cron job, the firefox selenium browser is not shown on my screen. How can I display the firefox browser to the screen by using cron jobs? An example open_dashboard.py may look as the following:



from selenium import webdriver
from selenium.webdriver.common.keys import Keys

driver = webdriver.Firefox()
driver.get("https://eu-central-1.console.aws.amazon.com/cloudwatch")
# other steps are omitted to reduce complexity

# no driver.close() because the browser should stay






selenium cron






share|improve this question













share|improve this question











share|improve this question




share|improve this question










asked Mar 25 at 8:41









CapCaCapCa

388415




388415












  • Where (what directory) are you running the cron job? You might have to export a PATH variable as well if the shell script is running somewhere that doesn't have access to it, otherwise it won't be able to find your geckodriver which is what opens firefox.

    – C. Peck
    Mar 27 at 1:06

















  • Where (what directory) are you running the cron job? You might have to export a PATH variable as well if the shell script is running somewhere that doesn't have access to it, otherwise it won't be able to find your geckodriver which is what opens firefox.

    – C. Peck
    Mar 27 at 1:06
















Where (what directory) are you running the cron job? You might have to export a PATH variable as well if the shell script is running somewhere that doesn't have access to it, otherwise it won't be able to find your geckodriver which is what opens firefox.

– C. Peck
Mar 27 at 1:06





Where (what directory) are you running the cron job? You might have to export a PATH variable as well if the shell script is running somewhere that doesn't have access to it, otherwise it won't be able to find your geckodriver which is what opens firefox.

– C. Peck
Mar 27 at 1:06












0






active

oldest

votes














Your Answer






StackExchange.ifUsing("editor", function ()
StackExchange.using("externalEditor", function ()
StackExchange.using("snippets", function ()
StackExchange.snippets.init();
);
);
, "code-snippets");

StackExchange.ready(function()
var channelOptions =
tags: "".split(" "),
id: "1"
;
initTagRenderer("".split(" "), "".split(" "), channelOptions);

StackExchange.using("externalEditor", function()
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled)
StackExchange.using("snippets", function()
createEditor();
);

else
createEditor();

);

function createEditor()
StackExchange.prepareEditor(
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader:
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
,
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
);



);













draft saved

draft discarded


















StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55333955%2fselenium-open-firefox-on-screen-with-cron%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown

























0






active

oldest

votes








0






active

oldest

votes









active

oldest

votes






active

oldest

votes















draft saved

draft discarded
















































Thanks for contributing an answer to Stack Overflow!


  • Please be sure to answer the question. Provide details and share your research!

But avoid


  • Asking for help, clarification, or responding to other answers.

  • Making statements based on opinion; back them up with references or personal experience.

To learn more, see our tips on writing great answers.




draft saved


draft discarded














StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f55333955%2fselenium-open-firefox-on-screen-with-cron%23new-answer', 'question_page');

);

Post as a guest















Required, but never shown





















































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown

































Required, but never shown














Required, but never shown












Required, but never shown







Required, but never shown







Popular posts from this blog

Kamusi Yaliyomo Aina za kamusi | Muundo wa kamusi | Faida za kamusi | Dhima ya picha katika kamusi | Marejeo | Tazama pia | Viungo vya nje | UrambazajiKuhusu kamusiGo-SwahiliWiki-KamusiKamusi ya Kiswahili na Kiingerezakuihariri na kuongeza habari

Swift 4 - func physicsWorld not invoked on collision? The Next CEO of Stack OverflowHow to call Objective-C code from Swift#ifdef replacement in the Swift language@selector() in Swift?#pragma mark in Swift?Swift for loop: for index, element in array?dispatch_after - GCD in Swift?Swift Beta performance: sorting arraysSplit a String into an array in Swift?The use of Swift 3 @objc inference in Swift 4 mode is deprecated?How to optimize UITableViewCell, because my UITableView lags

Access current req object everywhere in Node.js ExpressWhy are global variables considered bad practice? (node.js)Using req & res across functionsHow do I get the path to the current script with Node.js?What is Node.js' Connect, Express and “middleware”?Node.js w/ express error handling in callbackHow to access the GET parameters after “?” in Express?Modify Node.js req object parametersAccess “app” variable inside of ExpressJS/ConnectJS middleware?Node.js Express app - request objectAngular Http Module considered middleware?Session variables in ExpressJSAdd properties to the req object in expressjs with Typescript