PyQt4 is a GUI framework that has full browser engine - WebKit. Sellenium tests run in the browser - so you would have to make such tests that dump DOM tree (parsed HTML source) from the browser and not the standard non-parsed page source.
They may get frozen accounts, but the ad publishers don't froze them just like that (everyone could paralyze ad publishing on sites they don't like) so if they see that "click" was made with "I'm a bot that click things" user agent they will detect "invalid" click, not sneaky fraud attempts :) (although someone may also use PyQt4 webkit apps as a fraud apps, but it's not the point of this code tutorials). It may be used in "bad" or "good" ways.
Note that in the third tutorial where the app "clicks" the ads the USER AGENT is changed to bot-like so it's not a hidden evil click-fraud app. The use of the app is one of many possible (it also may not click them, just count how much adds shows up on certain pages etc.), and not all ads are contextual like Google Ads but randomly displayed from a pool of adds for a given page - so refreshing gets more data.
This tutorial shows whats possible with WebKit, which isn't possible with CURL :)