如何通过检查硒python中是否已单击复选框来取消选中该复选框

问题描述 投票:1回答:2

单击一个复选框以及如何取消选择该复选框

domestic=driver.find_element_by_xpath('//*[@id="chkGraphic_0"]')
driver.execute_script("arguments[0].click();",domestic)
python selenium xpath checkbox webdriverwait
2个回答
2
投票

如果要首先选中复选框,请使用.is_selected()


0
投票

使用execute_script()并不是<> 复选框

© www.soinside.com 2019 - 2024. All rights reserved.