def selenium_browser_record(filee, instrumented_f, jalangi=util.DEFAULT_INSTALL): selenium_util = load_selenium(jalangi) print instrumented_f real_inst_file = os.path.join( os.path.dirname(os.path.abspath(filee + ".js")), instrumented_f) return selenium_util.record(real_inst_file, jalangi)
def selenium_browser_record(filee, instrumented_f, jalangi=util.DEFAULT_INSTALL): selenium_util = load_selenium(jalangi) print instrumented_f real_inst_file = os.path.join(os.path.dirname(os.path.abspath(filee + ".js")),instrumented_f) return selenium_util.record(real_inst_file,jalangi)
# deliberately printing on stdout, # as we don't want this as part of the error message print "WebDriverException" print e exit(0) # instrument file (instrumented, out) = commands.instrument(os.path.splitext(script)[0]) # instrumented is in same directory as original script instrumented = os.path.join(os.path.dirname(os.path.abspath(script)),instrumented) print instrumented record = selenium_util.record(instrumented) print record print "replaying" replay_args = ["node","src/js/commands/replay.js"] sp = subprocess.Popen(replay_args,stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = sp.communicate() print "replay done" if err: print >> sys.stderr, err # bingo exit(1)
# deliberately printing on stdout, # as we don't want this as part of the error message print "WebDriverException" print e exit(0) # instrument file (instrumented, out) = commands.instrument(os.path.splitext(script)[0]) # instrumented is in same directory as original script instrumented = os.path.join(os.path.dirname(os.path.abspath(script)), instrumented) print instrumented record = selenium_util.record(instrumented) print record print "replaying" replay_args = ["node", "src/js/commands/replay.js"] sp = subprocess.Popen(replay_args, stdout=subprocess.PIPE, stderr=subprocess.PIPE) out, err = sp.communicate() print "replay done" if err: print >> sys.stderr, err # bingo exit(1)