
The file may not be executable with the default permissions. STEP 2:ĭownload the script (now from GitHub) extract it and place the script somewhere safe so it doesn’t get moved etc. Update: In recent updates I have made the script compatible with Python2.5 -> Python2.7, I’ve documented my experience in installing the required packages on my GitHub Wiki. This works but only seems to apply to python2.7 if I cared enough I would maybe try to work it out for the default version of python (2.5) but the path of least resistance means that to run the script we are just going to use python2.7 to execute it.
Geektool closing popup install#
The easiest way I found to install this was via the terminal using the following command: sudo easy_install tweepy Well python comes pre-installed on OSX so you shouldn’t need to install anything new, but we do need to get the 'Tweepy’ package to talk to the Twitter API. I have amended the script to print an example line using full paths for GeekTool, but can only test this on my system. It has come to my attention: That GeekTool sometimes will not see the full path to python2.7, I believe it was working on my system because I have Xcode installed. I’ve tested this script using the latest version of GeekTool (available in the Mac App Store) using OSX Lion, It should work… but as a disclaimer I’m throwing this up as a ‘work in progress’ script, but should get the job done. I then integrated the OAuth app/token creation, while trying to make it as user-friendly as possible, limiting the amount of prerequisites to run this script to a minimum.
Geektool closing popup manual#
It worked fine out the box, but after a bit of manual configuration, I started adding some pretty formatting then found myself adding some new features like a Twitter search or retweet monitoring etc….

I wasn’t having much luck until I started searching for a command line Twitter access using OAuth… then I stumbled on a blog post containing a Python script which could retrieve user timelines, post tweets etc. The main issue was any existing Twitter GeekTool scripts I found used basic authentication which is no longer supported by the Twitter API as it was replaced with OAuth authentication (which is good, but makes accessing the API authenticated a bit more difficult).

I’ve been playing around with GeekTool recently and one of the first things I wanted to include was my Twitter timeline on my desktop which proved to be a more difficult task than I expected. ("Page title of parent window: "+ driver.Adding Twitter into GeekTool using OAuth! ("Page title of popup: "+ driver.getTitle()) tProperty("", "C:\\Users\\ghs6kor\\Desktop\\Java\\chromedriver.exe") ĭriver.manage().timeouts().implicitlyWait(10, TimeUnit.SECONDS) ĭriver.findElement(By.id("login−google−button")).click() We have to incorporate import, import, and import packages to work with the above methods. The window handle id of the pop up is passed as an argument to the method.
Geektool closing popup driver#
To switch the focus of the driver to the child pop up window, we can take the help of the switchTo().window method. By default, the Selenium driver has the control over the parent window.

To iterate over the window handles, the iterator method is used. To store the window handle of the pop up in focus, the getWindowHandle method is used. To store all the window handles opened in a Set data structure, the getWindowHandles method is used. The getWindowHandles and getWindowHandle methods are used for the pop up window. We can close the pop up window with Selenium.
