Я использую селен для выполнения действий над веб-элементами через мобильное устройство IOS. он всегда генерирует исключение для любого действия, которое я выполняю в OpenQA.Selenium.Appium.Service.AppiumCommandExecutor.Execute (Command commandToExecute) в OpenQA.Selenium.Remote.RemoteWebDriver.Execute (String driverCommandToExecute, Dictionary 2 parameters)
at OpenQA.Selenium.Appium.AppiumDriver
ExCueEecuteecuecu, ExecuteПараметры Dictionary`2)
я запускаю код selenium C # в Windows и открываю сервер appium на компьютере MAC, подключенном к устройству IOS, которое мне нужно для запуска браузера Safari на нем.
ПРИМЕЧАНИЕ. Я использую следующие версии MAC-версии: macos mojava 10.14.6 браузер Safari на MAC: 13.0.2 Сервер Appium на компьютере MAC - версия браузера Safari 1.15.0 на устройстве IOS: 13.0.1 Версия устройства IOS:13.1
и использование этого конструктора для запуска драйвера: новый IOSDriver (новый Uri (хост), требуемая емкость);
- Журналы сервера Appium показывают:
[HTTP] --> POST /wd/hub/session/08b895a6-6515-4420-ab73-543ace23cdf2/element
[HTTP] {"using":"css selector","value":"*[name=\"first_name\"]"}
[debug] [W3C (08b895a6)] Calling AppiumDriver.findElement() with args: ["css selector","*[name=\"first_name\"]","08b895a6-6515-4420-ab73-543ace23cdf2"]
[debug] [XCUITest] Executing command 'findElement'
[debug] [BaseDriver] Valid locator strategies for this request: xpath, id, name, class name, -ios predicate string, -ios class chain, accessibility id
[debug] [BaseDriver] Waiting up to 4000 ms for condition
[debug] [RemoteDebugger] Executing atom 'find_element'
[debug] [RemoteDebugger] Executing 'find_element' atom in default context
[debug] [RemoteDebugger] Sending javascript command: '(function(){return function(){var k=this;functi...'
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to app 'PID:969', page '1', target 'page-6' (id: 11)
[debug] [RemoteDebugger] Received data response from send (id: 11): '{"status":0,"value":{"ELEMENT":":wdc:1571832365624"}}'
[debug] [RemoteDebugger] Sending to Web Inspector took 49ms
[debug] [RemoteDebugger] Received result for atom 'find_element' execution: {"ELEMENT":":wdc:1571832365624"}
[debug] [W3C (08b895a6)] Responding to client with driver.findElement() result: {"element-6066-11e4-a52e-4f735466cecf":"5000","ELEMENT":"5000"}
[HTTP] <-- POST /wd/hub/session/08b895a6-6515-4420-ab73-543ace23cdf2/element 200 58 ms - 73
[HTTP]
[HTTP] --> POST /wd/hub/session/08b895a6-6515-4420-ab73-543ace23cdf2/element/5000/value
[HTTP] {"text":"alia","value":["a","l","i","a"]}
[debug] [W3C (08b895a6)] Calling AppiumDriver.setValue() with args: [["a","l","i","a"],"5000","08b895a6-6515-4420-ab73-543ace23cdf2"]
[debug] [XCUITest] Executing command 'setValue'
[debug] [RemoteDebugger] Executing atom 'click'
[debug] [RemoteDebugger] Executing 'click' atom in default context
[debug] [RemoteDebugger] Sending javascript command: '(function(){return function(){var h,aa=this;fun...'
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to app 'PID:969', page '1', target 'page-6' (id: 12)
[debug] [RemoteDebugger] Received data response from send (id: 12): '{"status":0,"value":null}'
[debug] [RemoteDebugger] Sending to Web Inspector took 65ms
[debug] [RemoteDebugger] Received result for atom 'click' execution: null
[debug] [RemoteDebugger] Executing atom 'type'
[debug] [RemoteDebugger] Executing 'type' atom in default context
[debug] [RemoteDebugger] Sending javascript command: '(function(){return function(){var h,aa=this;fun...'
[debug] [RemoteDebugger] Sending '_rpc_forwardSocketData:' message to app 'PID:969', page '1', target 'page-6' (id: 13)
[HTTP] <-- POST /wd/hub/session/08b895a6-6515-4420-ab73-543ace23cdf2/element/5000/value - - ms - -
[HTTP]