阿里快递自动化与硒和 python
Ali express automation with selenium and python
我正在使用 selenium 和 python 在 Aliexpress automation 工作,现在卡在这里,问题是我没有找到订单数量按钮的任何选择器,以根据用户选择增加数量,因为在图像下方圈出。我试过 class name 但没有用,如果有人知道解决方案请评论。
link给页面给出:
https://www.aliexpress.com/item/1005002611164689.html?spm=a2g0o.productlist.0.0.2fec7741zQOW1u&algo_pvid=null&algo_expid=null&btsid=0b0a555d16226644016931040e3512&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_
尝试过的代码:
quantity=driver.find_element_by_class_name("next-btn next-medium next-btn-normal").click()
Class 您使用的名称 returns 2 个按钮,而不是一个。试试这个
driver.find_element_by_xpath(".//span[@class='next-input-group-addon next-after']/button").click()
我正在使用 selenium 和 python 在 Aliexpress automation 工作,现在卡在这里,问题是我没有找到订单数量按钮的任何选择器,以根据用户选择增加数量,因为在图像下方圈出。我试过 class name 但没有用,如果有人知道解决方案请评论。 link给页面给出: https://www.aliexpress.com/item/1005002611164689.html?spm=a2g0o.productlist.0.0.2fec7741zQOW1u&algo_pvid=null&algo_expid=null&btsid=0b0a555d16226644016931040e3512&ws_ab_test=searchweb0_0,searchweb201602_,searchweb201603_ 尝试过的代码:
quantity=driver.find_element_by_class_name("next-btn next-medium next-btn-normal").click()
Class 您使用的名称 returns 2 个按钮,而不是一个。试试这个
driver.find_element_by_xpath(".//span[@class='next-input-group-addon next-after']/button").click()