# Проверка подключенных устройств
COUNT=0
export iPhone7Plus=$(idevicename -u ac07a72e7ae94d3bef22e62b72edb7275fa5e7f4)
export iPhone8=$(idevicename -u ff9da6098c44782027fae72d31eaf31d10194372)
export iPhone6S=$(idevicename -u 7b2b2dba09632a502311d3ed049da0b776acdf48)
export iPhone7=$(idevicename -u 71fc65d6408dfb674c1b91c083a4a9a087716752)
export iPhoneXS=$(idevicename -u 00008020-001C45301E04002E)
export iPhone7Plus2=$(idevicename -u 966bfc1ac3786d69cd99143d7807f053ebd3017f)
# Запуск Appium серверов
if [ "$iPhone7Plus" = "iPhone7plus" ]; then
appium -a
127.0.0.1 -p 4723 --webkit-debug-proxy-port 27753 --debug-log-spacing --log-level "debug" > appium_session_iPhone7plus.log 2>&1 &
until [ "$(curl -s -o /dev/null -w '%{http_code}\n'
http://127.0.0.1:4723)" != "000" ]
do
echo "Waiting for appium server..."
sleep 2
done
COUNT=$(($COUNT + 1))
fi;
if [ "$iPhone8" = "iPhone8" ]; then
appium -a
127.0.0.1 -p 4724 --webkit-debug-proxy-port 27754 --debug-log-spacing --log-level "debug" > appium_session_iPhone8.log 2>&1 &
until [ "$(curl -s -o /dev/null -w '%{http_code}\n'
http://127.0.0.1:4724)" != "000" ]
do
echo "Waiting for appium server..."
sleep 2
done
COUNT=$(($COUNT + 1))
fi;
if [ "$iPhone6S" = "iPhone6s" ]; then
appium -a
127.0.0.1 -p 4725 --webkit-debug-proxy-port 27755 --debug-log-spacing --log-level "debug" > appium_session_iPhone6S.log 2>&1 &
until [ "$(curl -s -o /dev/null -w '%{http_code}\n'
http://127.0.0.1:4725)" != "000" ]
do
echo "Waiting for appium server..."
sleep 2
done
COUNT=$(($COUNT + 1))
fi;
if [ "$iPhone7" = "iPhone7" ]; then
appium -a
127.0.0.1 -p 4726 --webkit-debug-proxy-port 27756 --debug-log-spacing --log-level "debug" > appium_session_iPhone7.log 2>&1 &
until [ "$(curl -s -o /dev/null -w '%{http_code}\n'
http://127.0.0.1:4726)" != "000" ]
do
echo "Waiting for appium server..."
sleep 2
done
COUNT=$(($COUNT + 1))
fi;
if [ "$iPhoneXS" = "iPhone XS" ]; then
appium -a
127.0.0.1 -p 4727 --webkit-debug-proxy-port 27757 --debug-log-spacing --log-level "debug" > appium_session_iPhoneXS.log 2>&1 &
until [ "$(curl -s -o /dev/null -w '%{http_code}\n'
http://127.0.0.1:4727)" != "000" ]
do
echo "Waiting for appium server..."
sleep 2
done
COUNT=$(($COUNT + 1))
fi;
if [ "$iPhone7Plus2" = "iPhone 7+" ]; then
appium -a
127.0.0.1 -p 4728 --webkit-debug-proxy-port 27758 --debug-log-spacing --log-level "debug" > appium_session_iPhone7Plus2.log 2>&1 &
until [ "$(curl -s -o /dev/null -w '%{http_code}\n'
http://127.0.0.1:4728)" != "000" ]
do
echo "Waiting for appium server..."
sleep 2
done
COUNT=$(($COUNT + 1))
fi;