Posts RSS Comments RSS 4 Posts and 0 Comments till now

Archive for the 'Selenium' Category

Disabling Firefox’s Update Checks

I’ve had a problem with Selenium’s custom profiles for a while so I settled using the fresh instance Selenium creates when it opens. I also spent quite a bit of time over the course of the past few Firefox releases figuring out how to disable the various popups and such that open when your fresh instance loads. As of Firefox 3.5.x to disable the automatic addon update checking, add these two lines to your user.js file (inside <randomstring>.default)

Continue Reading »

Selenium and TinyMCE

For many projects, my shop uses TinyMCE for a quick and feature rich WYSIWYG editor. While its simple to implement, it can be awful to automate. Using Selenium type, click, click_at, etc will not work (I suspect because the editor is technically external from the page were testing, see below).

Initially my problem was that I did not allow enough for the page to load before using JS to enter info in to the box. To rectify this, I used time.sleep(5).

Next the issue arose that enterring characters via JS did not register with the character counting mechanism. Since i’m on a time based budget, I can’t spend too much time on this but I figure using os (python) or keypress/keydown in JS will do the trick.

This is the code to use when encountering a TinyMCE box.

Continue Reading »