def kill(): Log.info("Kill gradle processes.") if Settings.HOST_OS is OSType.WINDOWS: Process.kill(proc_name='java.exe', proc_cmdline='gradle') else: command = "ps -ef | grep '.gradle/wrapper' | grep -v grep | awk '{ print $2 }' | xargs kill -9" run(cmd=command)
def stop(): if Settings.HOST_OS == OSType.WINDOWS: Process.kill('Docker Desktop') Process.kill('Docker.Watchguard') Process.kill('com.docker.backend') Process.kill('com.docker.proxy') if OSUtils.is_catalina(): Process.kill('Docker')
def kill(): """ Kill all tns related processes. """ Log.info("Kill tns processes.") if Settings.HOST_OS == OSType.WINDOWS: Process.kill(proc_name='node') else: Process.kill(proc_name='node', proc_cmdline=Settings.Executables.TNS) Process.kill_by_commandline(cmdline='webpack.js')
def setUpClass(cls): Folder.clean(Settings.TEST_OUT_HOME) Folder.create(Settings.TEST_OUT_LOGS) Folder.create(Settings.TEST_OUT_IMAGES) Folder.create(Settings.TEST_OUT_TEMP) Process.kill(proc_name="adb") TnsRunAndroidTest.setUpClass() url = "https://github.com/webdriverio/native-demo-app/releases/download/0.2.1/Android-NativeDemoApp-0.2.1.apk" cls.apk_path = os.path.join(Settings.TEST_RUN_HOME, "test.apk") File.delete(path=cls.apk_path) File.download(file_name='test.apk', url=url, destination_dir=Settings.TEST_RUN_HOME)
def stop(sim_id='booted'): """ Stop running simulators (by default stop all simulators) :param sim_id: Device identifier (Simulator ID) """ if sim_id == 'booted': Log.info('Stop all running simulators.') Process.kill('Simulator') Process.kill('tail') Process.kill('launchd_sim') Process.kill_by_commandline('CoreSimulator') else: Log.info('Stop simulator with id ' + sim_id) run(cmd='xcrun simctl shutdown {0}'.format(sim_id), timeout=60)
def kill(self, force=Jenkins.is_ci()): """ Kill Chrome browsers instance(s). :param force: If false it will kill only browsers started by driver. If true it will force kill all chrome processes. By default `force` is set to false on local machines and true on CI (when JENKINS_HOME variable is set). """ if self.driver is not None: self.driver.quit() if force: if Settings.HOST_OS == OSType.OSX: Process.kill(proc_name='Google Chrome', proc_cmdline=None) else: Process.kill(proc_name="chrome", proc_cmdline=None) Process.kill(proc_name='chromedriver') Log.info('Kill Chrome browser!')
def stop(): """ Stop all running emulators. """ Log.info('Stop all running emulators...') Process.kill_by_commandline('qemu') Process.kill_by_commandline('emulator64') Process.kill('emulator64-arm') Process.kill('emulator64-x86') Process.kill('emulator-arm') Process.kill('emulator-x86') Process.kill('qemu-system-arm') Process.kill('qemu-system-i386') Process.kill('qemu-system-i38')
def kill(): """ Kill ng cli processes. """ Process.kill(proc_name='node', proc_cmdline=Settings.Executables.NG) Process.kill_by_port(DEFAULT_PORT)
def kill(): """ Kill all instance of appium server. """ Process.kill(proc_name='node', proc_cmdline='appium')
def tearDownClass(cls): Process.kill(proc_name="adb") TnsRunAndroidTest.tearDownClass()
def stop(): if OSUtils.is_catalina(): Process.kill('Docker')
def restart(): Log.info("Restart adb.") Adb.run_adb_command('kill-server') Process.kill(proc_name='adb') Adb.run_adb_command('start-server')