У меня есть DatePicker, который отображается как UIDatePickerContentView, которым мне нужно манипулировать в автоматическом тесте для установки даты. Дерево REPL зависает, когда отображается средство выбора даты, поэтому оно перемещается в темноте, чтобы понять, что находится в модели. Я смог немного опросить, используя следующее ...
>>> app.Query(c => c.Raw("UIDatePickerContentView"))
Query for Raw("UIDatePickerContentView") gave 23 results.
[0] {
Id => null,
Description => "<UIDatePickerContentView: 0x7f99c3fc1e80; frame = (0 0; 132 32); layer = <CALayer: 0x60000713c580>>",
Rect => {
Width => 126.63,
Height => 7.12,
X => 221.83,
Y => 193.18,
CenterX => 285.15,
CenterY => 196.74
},
Label => "September",
Text => null,
Class => "UIDatePickerContentView",
Enabled => true
},
[1] {
Id => null,
Description => "<UIDatePickerContentView: 0x7f99cbc3e6a0; frame = (0 0; 132 32); layer = <CALayer: 0x600003b49ca0>>",
Rect => {
Width => 130.03,
Height => 19.39,
X => 218.59,
Y => 200.64,
CenterX => 283.6,
CenterY => 210.33
},
Label => "October",
Text => null,
Class => "UIDatePickerContentView",
Enabled => true
... но не могу найти никакой информации о методах бэкдора в этом классе, которые могут быть вызваны.
Я мог бы написать хакерский метод, чтобы установить вещи, но я уверен, что должен быть более хороший способ установить дату. Любые идеи будут оценены.
Трассировка стека:
Execution failed with exception: System.Net.WebException: GET Failed
at Xamarin.UITest.Shared.Http.HttpClient.HandleHttpError (System.String method, System.Exception exception, Xamarin.UITest.Shared.Http.ExceptionPolicy exceptionPolicy) [0x0003c] in <12fefce8c9d24a03847e99ca872ebbec>:0
at Xamarin.UITest.Shared.Http.HttpClient.Request (System.String method, System.String endpoint, Xamarin.UITest.Shared.Http.ExceptionPolicy exceptionPolicy, System.Nullable`1[T] timeOut) [0x00155] in <12fefce8c9d24a03847e99ca872ebbec>:0
at Xamarin.UITest.Shared.Http.HttpClient.Get (System.String endpoint, Xamarin.UITest.Shared.Http.ExceptionPolicy exceptionPolicy, System.Nullable`1[T] timeOut) [0x00000] in <12fefce8c9d24a03847e99ca872ebbec>:0
at Xamarin.UITest.iOS.HttpCalabashConnection.Dump () [0x00000] in <12fefce8c9d24a03847e99ca872ebbec>:0
at Xamarin.UITest.iOS.iOSGestures.Dump () [0x00000] in <12fefce8c9d24a03847e99ca872ebbec>:0
at Xamarin.UITest.Utils.TreePrintHelper.PrintTree (Xamarin.UITest.Utils.ITreePrinter treePrinter) [0x00006] in <12fefce8c9d24a03847e99ca872ebbec>:0
at Xamarin.UITest.Queries.AppPrintHelper.Tree (System.Nullable`1[T] console) [0x0001c] in <12fefce8c9d24a03847e99ca872ebbec>:0
at <InteractiveExpressionClass>.Host (System.Object& $retval) [0x00010] in <7453cce1cdcc4fe4afe263a530a7fb22>:0
at Mono.CSharp.Evaluator.Evaluate (System.String input, System.Object& result, System.Boolean& result_set) [0x0003e] in <e5610ebfe8c34526a8158db3c89186d4>:0
at Xamarin.UITest.Repl.Evaluation.MonoCSharpReplEngine.Evaluate (System.String line) [0x00017] in <36fced282c0c46b3875df4694444ba35>:0
at Xamarin.UITest.Repl.Repl.ReplFacade.RunCode (System.String code) [0x00026] in <b735ea7cb64e4833abf7213ad2e5f225>:0
at Xamarin.UITest.Repl.PromptHandler.PrintTree () [0x00000] in <b735ea7cb64e4833abf7213ad2e5f225>:0
at Xamarin.UITest.Repl.PromptHandler.HandleInput (System.ConsoleKeyInfo key) [0x00072] in <b735ea7cb64e4833abf7213ad2e5f225>:0
at Xamarin.UITest.Repl.Program.Main (System.String[] args) [0x00177] in <b735ea7cb64e4833abf7213ad2e5f225>:0
Press any key to exit.