答案 0 :(得分:0)
好的,我已经明白了
within all("select#contract_id")[0] do
@order_name = all("option")[4].text
all("option")[4].click
end
select @order_name, from: "contract_id"
@order_name = @order_name.split[0]
因某些无法解释的原因而产生了一些问题。但
within all("select#contract_id")[0] do
@order_name = all("option")[4].text
end
select @order_name, from: "contract_id"
@order_name = @order_name.split[0]
工作正常