Previous topic

Tutorial

Next topic

Base

This Page

Addons

Module: region Author: arjs.net License: http://opensource.org/licenses/mit-license.html; year=2013,2014; copyright holders=arjs.net

class addons.Chrome(bpath, rpath)

Chrome: Extensions for chrome browser

__init__(bpath, rpath)
Parameters:
  • bpath (str) –
  • rpath (str) –
Return type:

Chrome

centermouse(showdebug=False)
Return type:bool

Move the mouse to the center of the screen

Raises Exception:
 
checkifexists(image, regn=None, showdebug=False)
Parameters:
  • image (str) – image to exist
  • regn (Region) – restrict region to look for the image
  • showdebug (bool) – show debug information
Returns:

Return type:

bool

Check if an image exists

Raises Exception:
 
clearmouse(showdebug=False)
Return type:bool

Move the mouse to the top-left corner

Raises Exception:
 
Parameters:
  • image (str) – image to click
  • showdebug (bool) – show debug information
Returns:

Return type:

bool

Click on an image

Raises Exception:
 
close(showdebug=False)
Parameters:showdebug (bool) – show debug information
Returns:
Return type:bool

Close the chrome browser

Raises Exception:
 
closetab(showdebug=False)
Parameters:showdebug (bool) –
Returns:
Return type:bool

Close a tab

Raises Exception:
 
enterkey(key='', showdebug=False)
Parameters:
  • key (str) – key to type
  • showdebug (bool) – show debug information
Returns:

Return type:

bool

Type a specific key

Raises Exception:
 
hoverifexists(image, clearmouse=False, dx=0, dy=0, regn=None, showdebug=False)
Parameters:
  • image (str) – image to hover over
  • clearmouse (bool) – clear mouse bevor hover
  • dx (int) –
  • dy (int) –
  • regn (Region) – restrict region to look for the image
  • showdebug (bool) – show debug information
Returns:

Return type:

object

Hover over an image

Raises Exception:
 
navigateto(url='', showdebug=False)
Parameters:
  • url (str) – url to navigate to
  • showdebug (bool) – show debug information
Returns:

Return type:

bool

Navigate to a url

Raises Exception:
 
open(showdebug=False)
Parameters:showdebug (bool) – Show debug information
Returns:
Return type:object

Open a chrome browser on linux, mac and windows

Raises Exception:
 
opentab(showdebug=False)
Parameters:showdebug (bool) – show debug information
Returns:
Return type:bool

Open a new tab

Raises Exception:
 
pageback(showdebug=False)
Return type:bool
Parameters:showdebug (bool) – show debug information
Returns:

Go one page back

Raises Exception:
 
pageend(showdebug=False)
Parameters:showdebug (bool) – show debug information
Returns:
Return type:bool

Go to page end

Raises Exception:
 
pagestart(showdebug=False)
Parameters:showdebug (bool) – show debug information
Returns:
Return type:bool

Goto page start

Raises Exception:
 
waituntil(image, tstep=1, nmax=50, showdebug=False)
Parameters:
  • image (str) – image to appear
  • tstep (int) – how much time for the timeout in seconds
  • nmax (int) – max tries
  • showdebug (bool) – show debug information
Returns:

Return type:

bool

Wait until an image appears

Raises Exception: