Dangers of running Appium as a python subprocess? -
i'm using appium ui testing, , robot framework above that. i'm trying automate of servers , services necessary test ios app, including appium server. seems causing breakage inside appium. in particular, seem stuck when calling driver.get_elements_by_accessibility_id(id)
the subprocess kick-off looks this:
self.app = subprocess.popen("appium", shell=true, stdout=pipe, stderr=pipe) when drop stdout/stderr kwargs, or make them point @ files, behavior returns normal. there dependence on stdout/stderr causes this?
don't use pipe unless read pipes e.g., using out, err = self.app.communicate(). otherwise, child process may hang why subprocess.call() docs warn:
do not use
stdout=pipeorstderr=pipefunction. child process block if generates enough output pipe fill os pipe buffer pipes not being read from.
subprocess.call() not consume pipes , therefore should not pass pipe it. to discard output, use devnull instead. same applies popen() if don't use self.app.stdout/stderr later.
Comments
Post a Comment