Python: Overwriting of squish methods which are injected after runtime -


i developing squish suite python should allow users without software development skills record testcases gui applications. of squish methods should changed/extended fit our special needs, , therefore write wrapper overwrites squish methods.

therefore best, if user has change few possible recorded code. don't want user has add "mywrapper." before every method call.

so thought add "from mywrapper import *"

with mywrapper containing methods same name squich methods, example:

def waitforobjectitem(object, item, timeout=none):     // additional stuff     return squish.waitforobjectitem(object, item, timeout) 

the problem (from squish website):

squish functions , member injected squish module @ runtime after test script has started/attached application.

therefore imported code of mywrapper not used.

how can force code executed instead of squish code without further changes of testcase recording.

it possible import "mywrapper" within main function instead of @ top of document. therefore not imported until function executed , therefore after injection of juice methods.


Comments

Popular posts from this blog

Command prompt result in label. Python 2.7 -

javascript - How do I use URL parameters to change link href on page? -

amazon web services - AWS Route53 Trying To Get Site To Resolve To www -