December 2008 Archive

completions breaking on zsh upgrade

December 4th, 2008

If you upgrade zsh and suddenly find that certain completion functions are breaking and throwing up all over your terminal, remember to delete ~/.zcompdump.

For instance, when I upgraded one of my systems from 4.3.4 to 4.3.9, I would get the following error whenever I tried to complete a command name:

alternative:69: command not found: _path_commands

This gets me every time.

examining a dynamically loaded iframe in Selenium

December 2nd, 2008

Nothing too exciting here, just something I was chewing on for a while and wanted to write down. I’m testing a page that uses GreyBox to display modal windows. GreyBox puts the content in an iframe, so you have to do a little finagling to get at it. Most of the selenium rc methods that handle frames seem to require me to actually know something about the frame I’m looking at, like an id or a name or something. I dunno any of that crap, just use that damn iframe there.

Anyway, select_frame (I’m using the python bindings here) lets you use the “index” locator, so you can jump right in to the first frame. Then to get back out, there is the “relative” locator that lets you just move up one level. You end up with something like this:

# do stuff in the main window here
sel.click("the link you're clickin")
sel.select_frame('index=0')
# do stuff to the iframe here
sel.select_frame('relative=up')
# you're back in the main window

I don’t have all that solid a grasp on what’s going on around here, so I’m sure this only works in whatever bizarre edge case I have set up. Whatever, hopefully google will direct some poor soul here and I will end up making his day just that much brighter.

helvetireader list view css update

December 2nd, 2008

Here is an update to the CSS I posted the other day for tweaking Helvetireader.

#selectors-box, #add-box { display: none; }
.entry { -webkit-border-radius: 0 !important; -moz-border-radius: 0 ! important; }
.entry .collapsed { padding: 2px 0 2px 0 ! important; }
.entry .collapsed .entry-secondary { margin-top: 1px !important; }
.entry .collapsed .entry-original { margin-top: 2px !important; }
.entry .collapsed .entry-icons { top: -4px !important; }
.entry .collapsed .entry-date { margin: 0 30px 0 0 !important; padding: 1px 0 1px 0 !important; }
.entry-actions { height: 1.2em !important; padding-top: 0px !important; }
.entry-actions:hover { padding-left: 25px !important; }

I forgot to even mention in my last post, but the real reason for needing most of this is that I’m using Reader in list view, instead of expanded view as is intended. I think the only real difference you might see using this css in expanded view is that you won’t get the nice rounded corners around each entry. Unless there’s a CSS selector for matching the parent of a certain element, I don’t know a practical way to preserve the corners. I also never use expanded view, so I don’t care.