Перейти к содержимому

Фотография

Почему Eclipse не передает UDID девайса в Appium Server(IOS)

Eclipse Appium UDID

  • Авторизуйтесь для ответа в теме
В теме одно сообщение

#1 mebius

mebius

    Новый участник

  • Members
  • Pip
  • 5 сообщений
  • ФИО:Трусков Игорь

Отправлено 30 июля 2020 - 21:59

Нужна помощь.

Я начинающий в IOS тестировании. Есть небольшой опыт тестирования только под Андроид.

 

Не удается запустить простейшую тестовую программу на IOS эмуляторе.

Столкнулся с тем, что в Appium не передается UDID устройства при изменениии его(UDID) в программе,
а Аппиум все время получает UDID от физически отключенного реального устройства.(было подключено один раз)

 

Как это побороть?

Откуда берется информация о ранее подключенном устройстве и как ее изменить?

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

 

 

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

    import java.net.MalformedURLException;
    import java.net.URL;
    import java.util.concurrent.TimeUnit;
     
    import org.openqa.selenium.remote.DesiredCapabilities;
     
    import io.appium.java_client.MobileElement;
    import io.appium.java_client.ios.IOSDriver;
    import io.appium.java_client.remote.AutomationName;
    import io.appium.java_client.remote.MobileCapabilityType;
     
    public class Test03 {
     
    	public static void main(String[] args) throws MalformedURLException {
    		
    	    DesiredCapabilities cap = new DesiredCapabilities();
    	    cap.setCapability(MobileCapabilityType.PLATFORM_NAME, "IOS");
    	    cap.setCapability(MobileCapabilityType.PLATFORM_VERSION, "iOS 12.1");
    	    cap.setCapability(MobileCapabilityType.DEVICE_NAME, "iPhone 8");	    
    	    cap.setCapability(MobileCapabilityType.UDID,"2DE5194C-8BE8-4D7D-945D-C1FB51C1541E"); //emulator	  
    	    
    	    cap.setCapability(MobileCapabilityType.AUTOMATION_NAME, AutomationName.IOS_XCUI_TEST);	    
    	    cap.setCapability(MobileCapabilityType.APP, "//users//tatyanabarr//Desktop//UICatalog.app");	    
    	    IOSDriver<MobileElement> driver = new IOSDriver<MobileElement>(new URL("http://127.0.0.1:4723/wd/hub"), cap);
    	   		
    		driver.manage().timeouts().implicitlyWait(90, TimeUnit.SECONDS);	
    		
    		
    	}
     
    }
     
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Eclipse ERRORS !!!!!
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Exception in thread "main" org.openqa.selenium.SessionNotCreatedException: Unable to create a new remote session. Please check the server log for more details. Original error: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: 'ee85b31b247c7d7a1e0c898f84e839c3c8456e25'
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'Tatyana-Barrs-iMac.local', ip: '192.168.0.13', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '14.0.1'
    Driver info: driver.version: IOSDriver
    remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: 'ee85b31b247c7d7a1e0c898f84e839c3c8456e25'
        at getResponseForW3CError (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
        at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:392:37)
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'Tatyana-Barrs-iMac.local', ip: '192.168.0.13', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '14.0.1'
    Driver info: driver.version: IOSDriver
    	at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:208)
    	at io.appium.java_client.remote.AppiumCommandExecutor.createSession(AppiumCommandExecutor.java:217)
    	at io.appium.java_client.remote.AppiumCommandExecutor.execute(AppiumCommandExecutor.java:239)
    	at org.openqa.selenium.remote.RemoteWebDriver.execute(RemoteWebDriver.java:552)
    	at io.appium.java_client.DefaultGenericMobileDriver.execute(DefaultGenericMobileDriver.java:41)
    	at io.appium.java_client.AppiumDriver.execute(AppiumDriver.java:1)
    	at io.appium.java_client.ios.IOSDriver.execute(IOSDriver.java:1)
    	at org.openqa.selenium.remote.RemoteWebDriver.startSession(RemoteWebDriver.java:213)
    	at io.appium.java_client.AppiumDriver.startSession(AppiumDriver.java:336)
    	at org.openqa.selenium.remote.RemoteWebDriver.<init>(RemoteWebDriver.java:131)
    	at io.appium.java_client.DefaultGenericMobileDriver.<init>(DefaultGenericMobileDriver.java:37)
    	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:88)
    	at io.appium.java_client.AppiumDriver.<init>(AppiumDriver.java:98)
    	at io.appium.java_client.ios.IOSDriver.<init>(IOSDriver.java:90)
    	at Test03.main(Test03.java:25)
    Caused by: java.lang.reflect.InvocationTargetException
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    	at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    	at java.base/java.lang.reflect.Method.invoke(Method.java:564)
    	at io.appium.java_client.remote.AppiumCommandExecutor$1.createSession(AppiumCommandExecutor.java:186)
    	... 14 more
    Caused by: org.openqa.selenium.WebDriverException: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: 'ee85b31b247c7d7a1e0c898f84e839c3c8456e25'
    Build info: version: '3.141.59', revision: 'e82be7d358', time: '2018-11-14T08:17:03'
    System info: host: 'Tatyana-Barrs-iMac.local', ip: '192.168.0.13', os.name: 'Mac OS X', os.arch: 'x86_64', os.version: '10.13.6', java.version: '14.0.1'
    Driver info: driver.version: IOSDriver
    remote stacktrace: UnknownError: An unknown server-side error occurred while processing the command. Original error: Unknown device or simulator UDID: 'ee85b31b247c7d7a1e0c898f84e839c3c8456e25'
        at getResponseForW3CError (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/errors.js:804:9)
        at asyncHandler (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-base-driver/lib/protocol/protocol.js:392:37)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
    	at java.base/jdk.internal.reflect.NativeConstructorAccessorImpl.newInstance(NativeConstructorAccessorImpl.java:62)
    	at java.base/jdk.internal.reflect.DelegatingConstructorAccessorImpl.newInstance(DelegatingConstructorAccessorImpl.java:45)
    	at java.base/java.lang.reflect.Constructor.newInstanceWithCaller(Constructor.java:500)
    	at java.base/java.lang.reflect.Constructor.newInstance(Constructor.java:481)
    	at org.openqa.selenium.remote.W3CHandshakeResponse.lambda$errorHandler$0(W3CHandshakeResponse.java:62)
    	at org.openqa.selenium.remote.HandshakeResponse.lambda$getResponseFunction$0(HandshakeResponse.java:30)
    	at org.openqa.selenium.remote.ProtocolHandshake.lambda$createSession$0(ProtocolHandshake.java:126)
    	at java.base/java.util.stream.ReferencePipeline$3$1.accept(ReferencePipeline.java:195)
    	at java.base/java.util.Spliterators$ArraySpliterator.tryAdvance(Spliterators.java:958)
    	at java.base/java.util.stream.ReferencePipeline.forEachWithCancel(ReferencePipeline.java:127)
    	at java.base/java.util.stream.AbstractPipeline.copyIntoWithCancel(AbstractPipeline.java:502)
    	at java.base/java.util.stream.AbstractPipeline.copyInto(AbstractPipeline.java:488)
    	at java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(AbstractPipeline.java:474)
    	at java.base/java.util.stream.FindOps$FindOp.evaluateSequential(FindOps.java:150)
    	at java.base/java.util.stream.AbstractPipeline.evaluate(AbstractPipeline.java:234)
    	at java.base/java.util.stream.ReferencePipeline.findFirst(ReferencePipeline.java:543)
    	at org.openqa.selenium.remote.ProtocolHandshake.createSession(ProtocolHandshake.java:128)
    	... 19 more
     
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
    Appium ERRORS !!!
    >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
     
    [W3C] Calling AppiumDriver.createSession() with args: [{"app":"//users//tatyanabarr//Desktop//UICatalog.app","platformVersion":"12.1","automationName":"XCuiTest","platformName":"IOS","udid":"ee85b31b247c7d7a1e0c898f84e839c3c8456e25","deviceName":"iPhone 7,1"},null,{"firstMatch":[{"appium:app":"//users//tatyanabarr//Desktop//UICatalog.app","appium:automationName":"XCuiTest","appium:deviceName":"iPhone 7,1","platformName":"ios","appium:platformVersion":"12.1","appium:udid":"ee85b31b247c7d7a1e0c898f84e839c3c8456e25"}]}]
    [BaseDriver] Event 'newSessionRequested' logged at 1596132839895 (14:13:59 GMT-0400 (Eastern Daylight Time))
    [Appium] Appium v1.17.1 creating new XCUITestDriver (v3.22.0) session
    [BaseDriver] W3C capabilities and MJSONWP desired capabilities were provided
    [BaseDriver] Creating session with W3C capabilities: {
    [BaseDriver]   "alwaysMatch": {
    [BaseDriver]     "platformName": "ios",
    [BaseDriver]     "appium:app": "//users//tatyanabarr//Desktop//UICatalog.app",
    [BaseDriver]     "appium:automationName": "XCuiTest",
    [BaseDriver]     "appium:deviceName": "iPhone 7,1",
    [BaseDriver]     "appium:platformVersion": "12.1",
    [BaseDriver]     "appium:udid": "ee85b31b247c7d7a1e0c898f84e839c3c8456e25"
    [BaseDriver]   },
    [BaseDriver]   "firstMatch": [
    [BaseDriver]     {}
    [BaseDriver]   ]
    [BaseDriver] }
    [BaseDriver] Session created with session id: c2426c0f-7153-4aa9-9845-0b8f3f4e306d
    [XCUITest] Current user: 'tatyanabarr'
    [XCUITest] Available devices: 
    [XCUITest] No real device with udid 'ee85b31b247c7d7a1e0c898f84e839c3c8456e25'. Looking for simulator
    [XCUITest] {}
    [DevCon Factory] Releasing connections for ee85b31b247c7d7a1e0c898f84e839c3c8456e25 device on any port number
    [DevCon Factory] No cached connections have been found
    [BaseDriver] Event 'newSessionStarted' logged at 1596132843827 (14:14:03 GMT-0400 (Eastern Daylight Time))
    [W3C] Encountered internal error running command: Error: Unknown device or simulator UDID: 'ee85b31b247c7d7a1e0c898f84e839c3c8456e25'
    [W3C]     at XCUITestDriver.determineDevice (/Applications/Appium.app/Contents/Resources/app/node_modules/appium/node_modules/appium-xcuitest-driver/lib/driver.js:804:19)
    [W3C] Destroying socket connection
    [HTTP] <-- POST /wd/hub/session 500 4034 ms - 715
    [HTTP] 

  • 0

#2 mebius

mebius

    Новый участник

  • Members
  • Pip
  • 5 сообщений
  • ФИО:Трусков Игорь

Отправлено 01 августа 2020 - 00:59

Все без проблем запускается через Инспектор но через Эклипс так и не могу запустить.
Подскажите куда копать или в чем ошибка?

 

http://prntscr.com/ts2uih


  • 0



Темы с аналогичным тегами Eclipse, Appium, UDID

Количество пользователей, читающих эту тему: 0

0 пользователей, 0 гостей, 0 анонимных