【发布时间】:2020-06-05 07:02:06
【问题描述】:
我正在尝试填写一份表格,其中每个订单号都有一个下拉菜单。
<select name="order(889673519).box(1).shippingmethod" onclick="" onchange=""
id="order(889673519).box(1).shippingmethod"><option value=""
id="order(889673519).box(1).shippingmethod.blank"></option>
对于每个下拉菜单,名称 css 选择器中的数字都会改变,所以第一个是 889673519 但第二个将是
<select name="order(889711159).box(1).shippingmethod" onclick="" onchange=""
id="order(889711159).box(1).shippingmethod"><option value=""
id="order(889711159).box(1).shippingmethod.blank"></option>
我使用什么路径来选择具有不同名称的多个元素,以便我可以遍历它们选择我的选项。
【问题讨论】:
标签: python selenium select xpath css-selectors