从日期时间选择器字段中获取日期时间的值

问题描述 投票:0回答:0

我有 2 个日期时间选择器字段,如下所示:

我需要检索这两个盒子上的值,但是,每次我尝试输入代码时都会出错:

stime= driver.find_elements(By.CLASS_NAME, "datetimepicker-inner").getitem(3) stime_val=stime.text

我也尝试过使用“textContent”和“Value”,但仍然没有返回 Datetime 值。

python selenium-webdriver datetimepicker python-datetime
© www.soinside.com 2019 - 2024. All rights reserved.