tag:blogger.com,1999:blog-5236867476487043111.post1095251415954187012..comments2024-03-11T07:55:47.104-04:00Comments on Corey Goldberg: Python - Headless Selenium WebDriver Tests using PyVirtualDisplayCorey Goldberghttp://www.blogger.com/profile/06219872951977664560noreply@blogger.comBlogger25125tag:blogger.com,1999:blog-5236867476487043111.post-57270102739429329992013-01-04T06:08:25.606-05:002013-01-04T06:08:25.606-05:00Lovely, dude, lovely.... Just what I was in need o...Lovely, dude, lovely.... Just what I was in need of.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-7514169676930110622012-12-31T18:48:04.994-05:002012-12-31T18:48:04.994-05:00@teja,
Firefox *is* running, just inside a virtua...@teja,<br /><br />Firefox *is* running, just inside a virtual x server. It is not displayed. So it is headless in that sense. You can run it from a server with no display attached.Corey Goldberghttps://www.blogger.com/profile/06219872951977664560noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-27197855603914779652012-12-31T18:46:27.080-05:002012-12-31T18:46:27.080-05:00How is this headless if you are getting the screen...How is this headless if you are getting the screenshot by using firefox? Tejanoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-37300340661625833282012-11-12T08:13:20.905-05:002012-11-12T08:13:20.905-05:00I had to install EasyProcess to get pyvirtualdispl...I had to install EasyProcess to get pyvirtualdisplay working.<br /><br /><b> sudo pip install EasyProcess </b><br /><br />BTW very nice tutorial.Ranveer Raghuwanshinoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-35111527432995986742012-09-04T04:15:25.146-04:002012-09-04T04:15:25.146-04:00Hi,
sorry yes it turns out that selenium will not...Hi,<br /><br />sorry yes it turns out that selenium will not run Firefox from a script and I needed to pass in the location of the binary<br /><br />ffbin = webdriver.firefox.firefox_binary.FirefoxBinary('/usr/lib/firefox/firefox')<br /> self.driver = webdriver.Firefox(firefox_binary=ffbin)<br /><br />I then ran into another bug or location problem really<br /><br />http://code.google.com/p/selenium/issues/detail?id=3049<br /><br />I did the ugly symbolic link and everything was fine.<br /><br />Thanks very much for the post.<br /><br />I hope this helps the next person that reads your postAnonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-66769111091984288072012-09-03T11:54:41.728-04:002012-09-03T11:54:41.728-04:00@avisual
can you run it *with* display turned on?...@avisual<br /><br />can you run it *with* display turned on?<br /><br />can you launch firefox from a command prompt without error? is firefox installed? is selenium installed? do you get any stack trace?<br /><br />not a mind reader :)Corey Goldberghttps://www.blogger.com/profile/06219872951977664560noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-59047127725096813152012-09-03T11:25:37.792-04:002012-09-03T11:25:37.792-04:00This comment has been removed by the author.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-564418130126730902012-09-03T11:24:14.081-04:002012-09-03T11:24:14.081-04:00I am just trying this under Redhat and this seems ...I am just trying this under Redhat and this seems to stall at the <br />browser = webdriver.Firefox()<br /><br />suggestions please<br /><br /><br />Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-67978688957740813462012-07-12T03:40:49.911-04:002012-07-12T03:40:49.911-04:00Thanks, works 100% under Ubuntu 12.10 and so neede...Thanks, works 100% under Ubuntu 12.10 and so needed this todaycbrunsdonzahttps://www.blogger.com/profile/10967549976094218245noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-62187927437316751632012-05-23T11:14:15.285-04:002012-05-23T11:14:15.285-04:00Yes, I know :PYes, I know :Pjbianquettihttps://www.blogger.com/profile/09224880543207910405noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-86734777605115573822012-05-23T11:12:46.399-04:002012-05-23T11:12:46.399-04:00Give a try to Simple Selenium Test: http://testuti...Give a try to Simple Selenium Test: http://testutils.org/sst/index.htmljbianquettihttps://www.blogger.com/profile/09224880543207910405noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-64976233730372658672012-05-23T10:58:09.824-04:002012-05-23T10:58:09.824-04:00yay for SST :)
I wrote the blog post while impleme...yay for SST :)<br />I wrote the blog post while implementing this feature in SST.Corey Goldberghttps://www.blogger.com/profile/06219872951977664560noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-74607922092107011772012-05-23T10:29:46.529-04:002012-05-23T10:29:46.529-04:00You should try http://testutils.org/sst/index.html...You should try http://testutils.org/sst/index.htmljbianquettihttps://www.blogger.com/profile/09224880543207910405noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-26464825607614899402012-05-13T13:05:54.449-04:002012-05-13T13:05:54.449-04:00thanks, work great for me. Great tipthanks, work great for me. Great tipFoobazhttps://www.blogger.com/profile/13447190038974406237noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-2895286658041006962012-03-19T00:15:56.204-04:002012-03-19T00:15:56.204-04:00Just tested this. Exactly the solution I'm loo...Just tested this. Exactly the solution I'm looking for! Great stuff!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-7692494781454083422012-03-13T03:21:53.038-04:002012-03-13T03:21:53.038-04:00Thanks Corey! This was a big help!Thanks Corey! This was a big help!Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-81753278493753816622011-08-17T23:46:48.626-04:002011-08-17T23:46:48.626-04:00Just wanted to say this was quite helpful for me, ...Just wanted to say this was quite helpful for me, was struggling to find docs on how to run it headless. Works with no probs, Debian wheezy.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-81421683652074849232011-07-19T17:28:13.985-04:002011-07-19T17:28:13.985-04:00John, Jason,
pyvirtualdisplay has some dependencie...John, Jason,<br />pyvirtualdisplay has some dependencies (xvfb, etc). I show how to satisfy them on Ubuntu/Debian. You are on your own for Mac.<br /><br />hth,<br /><br />-CoreyCorey Goldberghttps://www.blogger.com/profile/06219872951977664560noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-46591177339818747642011-07-19T17:26:27.730-04:002011-07-19T17:26:27.730-04:00I agree with John this doesn't work for me on ...I agree with John this doesn't work for me on OS X 10.6. It still opens like normal.Jasonhttps://www.blogger.com/profile/17220061905695269573noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-14868537345485734812011-07-17T14:09:35.808-04:002011-07-17T14:09:35.808-04:00This code doesn't work for me on OS X Snow Leo...This code doesn't work for me on OS X Snow Leopard, I see the Firefox window. <br /><br />Is there something other than PyVirtualDisplay and Selenium I need to install?Johnnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-31773731393639347572011-07-04T04:43:49.360-04:002011-07-04T04:43:49.360-04:00Try xvnc plug-in for JenkinsTry xvnc plug-in for JenkinsPrashantnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-88268548151261320562011-07-02T09:37:13.096-04:002011-07-02T09:37:13.096-04:00Very nice, I hadn't heard of Selenium before -...Very nice, I hadn't heard of Selenium before - looks very cool, especially as it can be paired with xvfb.Matt Austinhttps://www.blogger.com/profile/00275626819876122902noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-16659963692782463062011-06-11T02:44:36.735-04:002011-06-11T02:44:36.735-04:00Great post! Like Marius, I find that xvfb-run java...Great post! Like Marius, I find that <i>xvfb-run java -jar selenium-server-standalone-2.0b3.jar</i> works really well if your stuck with Selenium RC.Anonymousnoreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-16624844389707747702011-06-10T06:33:56.266-04:002011-06-10T06:33:56.266-04:00I have vague memories of seeing that Jenkins has a...I have vague memories of seeing that Jenkins has a native xvfb plugin.<br /><br />For buildbot jobs, I used to wrap my test-runner command with Debian's xvfb-run wrapper.<br /><br />I find the PyVirtualDisplay solution (that I didn't know about) very interesting as well. You could take a screenshot when tests fail, to figure out why that happened.Marius Gedminashttps://www.blogger.com/profile/15155998626202067226noreply@blogger.comtag:blogger.com,1999:blog-5236867476487043111.post-11765564211900154712011-06-09T18:09:45.271-04:002011-06-09T18:09:45.271-04:00That sounds neat! I'll definitely give it a tr...That sounds neat! I'll definitely give it a try.Anonymousnoreply@blogger.com