|
楼主 |
发表于 2024-4-14 22:19:05
|
显示全部楼层
有问题的python 代码如下所示:
# category_dropdown下拉菜单
product_category_dropdown_button1 = wd.find_element(By.ID,'o_field_input_883').click() # 下拉菜单按钮
time.sleep(6)
product_category_dropdown_button2 = wd.find_element(By.XPATH,'/html/body/ul[1]/li[8]').click() # 下拉菜单按钮
time.sleep(6)
product_category = row['product_category_button']
if product_category == 'Components':
product_category1_button = wd.find_element(By.XPATH, '/html/body/div[17]/div/div/main/div/div[2]/div/div/table/tbody/tr[1]/td[1]').click() # 需要Components按钮
pass
elif product_category == 'Finished Goods':
product_category8_button = wd.find_element(By.XPATH, '/html/body/div[17]/div/div/main/div/div[2]/div/div/table/tbody/tr[8]/td[1]').click() # 需要Finished Goods按钮
pass |
|