May 23

_autoBase.class Released

autoBase is a PHP Class i built for use in Selenium Server and it designed to work with my Portable Selenium Setup. the idea was that a bunch of Selenium functions i used were always such long ass lines so i created a bunch of wrapper functions to not only make the called lines shorter but also some logging, not to mention that if i wanted to chlike how i typed i just had to make one change in the code

now this class uses functions in my commonLib library so you will need that or to copy it’s functions over and depending on you’re set up you’ll need to fiddle with the require_once lines (though if you just using Portable Selenium Setup as it is there shouldn’t be a need to change).

autoBase boots up Chrome as i used to use Firefox until it started to play up on me and Chrome has been fairly reliable. if you inherit the constructor will be inherited too however you can create your own however the functions will fail if $this->driver is null.

it should be noted that while i primarily use this for automation and not so much for testing the testing elements can still be used.

download .zip

when inheriting autoBase you can use parent::__construct to call the original constructor with the array of parameters for your child class. they are

'url'             => 'http://www.google.com'        // The first url you go to
'newLog'         => true                            // whether your creating a new log file
'noMemLimit'     => false                        // disable the PHP Memory Limit
'adBlock'         => true                            // whether you want to load AdBlockPlus Extension 

and example of this is

$options = array(
    'url'         => 'http://www.mhoultramega.com/',
    'adBlock'    => false,

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>