Форум для тех, кто программирует под Android
Anonymous
Выбор даты из плагина календаря с помощью Appium и Selenium
Сообщение
Anonymous » 02 дек 2025, 02:34
Выбор даты из плагина даты оказался серьезной задачей. Я написал фрагмент кода, который делает это до предела. Я прикрепил сюда скриншоты, подробно описывающие процесс выбора.
скрипт:
Код: Выделить всё
_driver.FindElement(By.Id("com.appzonegroup.dejavuandroid.zoneRevamp:id/date_picker_year")).Click();
((IJavaScriptExecutor)driver).ExecuteScript("mobile: scroll", scrollObject);
int ThisYear = Int32.Parse( _driver.FindElement(By.XPath(AuthConstant.DatePickerYearButton)).Text);
String RegistrableYear = Convert.ToString(ThisYear - 25);
IList calcButton = _driver.FindElements(By.Id("com.appzonegroup.dejavuandroid.zoneRevamp:id/month_text_view"));
for(int i=0; i
Подробнее здесь: [url]https://stackoverflow.com/questions/41832933/selecting-date-from-a-calendar-plugin-using-appium-and-selenium[/url]
1764632084
Anonymous
Выбор даты из плагина даты оказался серьезной задачей. Я написал фрагмент кода, который делает это до предела. Я прикрепил сюда скриншоты, подробно описывающие процесс выбора. [img]https://i.sstatic.net/W31A4.png[/img] [img]https://i.sstatic.net/FiQ8U.png[/img] [img]https://i.sstatic.net/F9g6q.png[/img] [img]https://i.sstatic.net/Qpz2K.png[/img] скрипт: [code] _driver.FindElement(By.Id("com.appzonegroup.dejavuandroid.zoneRevamp:id/date_picker_year")).Click(); ((IJavaScriptExecutor)driver).ExecuteScript("mobile: scroll", scrollObject); int ThisYear = Int32.Parse( _driver.FindElement(By.XPath(AuthConstant.DatePickerYearButton)).Text); String RegistrableYear = Convert.ToString(ThisYear - 25); IList calcButton = _driver.FindElements(By.Id("com.appzonegroup.dejavuandroid.zoneRevamp:id/month_text_view")); for(int i=0; i Подробнее здесь: [url]https://stackoverflow.com/questions/41832933/selecting-date-from-a-calendar-plugin-using-appium-and-selenium[/url]