From 91d0b0990eb42523539369b2e3c4208a94bfe91a Mon Sep 17 00:00:00 2001 From: aaron <462826@qq.com> Date: Wed, 8 Apr 2020 08:17:08 +0800 Subject: [PATCH] add appium script --- demo/selenium/chrome.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/demo/selenium/chrome.php b/demo/selenium/chrome.php index 45738f40..cd1603bc 100644 --- a/demo/selenium/chrome.php +++ b/demo/selenium/chrome.php @@ -18,7 +18,7 @@ use Facebook\WebDriver\Remote\DesiredCapabilities; use Facebook\WebDriver\Chrome\ChromeOptions; include 'vendor/autoload.php'; if (isWindows()) -{ // launch build-in selenium driver to test +{ // launch build-in selenium driver server to test $command = 'start /B ' . dirname(__FILE__, 3) . '\runtime\selenium\chrome80.exe >log.txt 2>&1'; pclose(popen($command, 'r')); @@ -50,7 +50,11 @@ $title = $driver->getTitle(); print(">> $title\n"); $driver->close(); -exec('taskkill /F /im chrome80.exe'); + +if (isWindows()) +{ + exec('taskkill /F /im chrome80.exe'); +} function isWindows() { -- GitLab