<div id="product-tabs-container">
<div>
<div class="ux-conveyor-clip">
<a class="left ux-conveyor-control" data-slide="prev" role="button" href="javascript:void(0);" aria-label="previous" style="display: none;"><span class="sr-only">Previous</span></a>
<div class="ux-conveyor">
<ul class="nav nav-tabs" role="tablist" style="margin-left: 0px;">
<li id="description" class="nav-item " role="presentation"><button class="nav-link" role="tab" aria-selected="false">Description </button></li>
<li id="options" class="nav-item " role="presentation"><button class="nav-link" role="tab" aria-selected="false">Inventory & Options</button></li>
<li id="shipping" class="nav-item " role="presentation"><button class="nav-link active" role="tab" aria-selected="true">Shipping</button></li>
<li id="files" class="nav-item " role="presentation" style="display: none;"><button class="nav-link" role="tab" aria-selected="false">Downloadable Content</button></li>
<li id="search-engines" class="nav-item " role="presentation"><button class="nav-link" role="tab" aria-selected="false">Search Engines</button></li>
<li id="marketplaces-tab" class="nav-item " role="presentation" style="display: none;"><button class="nav-link" role="tab" aria-selected="false">Marketplaces</button></li>
</ul>
</div>
<a class="right ux-conveyor-control" data-slide="next" role="button" href="javascript:void(0);" aria-label="next" style="display: none;"><span class="sr-only">Next</span></a>
</div>
<div aria-labelledby="shipping" role="tabpanel">
<div>
<h5 style="display: inline;">Weight/dimensions of the shipping package</h5>
<span><span> <span role="button" aria-haspopup="true" class="uxicon uxicon-help" style="cursor: pointer; outline: none;"></span></span></span>
</div>
<p>Required for dimension-based shipping methods.</p>
<div class="additional-options well">
<div class="shipping-input-container">
<fieldset class="form-group">
<label for="product_weight">Weight </label>
<div class="input-group"><input id="product_weight" type="text" pattern="[\d,]*(\.[\d,]+)?" class="form-control ignore-invalid" value="0.00"><span class="input-group-addon">Lbs.</span></div>
</fieldset>
</div>
<h5 style="margin: 20px 0px;">Dimensions</h5>
<div class="row">
<div class="col-xs-12 col-sm-4">
<div class="shipping-input-container">
<fieldset class="form-group">
<label for="product_depth">Length </label>
<div class="input-group"><input id="product_depth" type="text" pattern="[\d,]*(\.[\d,]+)?" class="form-control ignore-invalid" value="0.00"><span class="input-group-addon">in.</span></div>
</fieldset>
</div>
</div>
<div class="col-xs-12 col-sm-4">
<div class="shipping-input-container">
<fieldset class="form-group">
<label for="product_width">Width </label>
<div class="input-group"><input id="product_width" type="text" pattern="[\d,]*(\.[\d,]+)?" class="form-control ignore-invalid" value="0.00"><span class="input-group-addon">in.</span></div>
</fieldset>
</div>
</div>
<div class="col-xs-12 col-sm-4">
<div class="shipping-input-container">
<fieldset class="form-group">
<label for="product_height">Height </label>
<div class="input-group"><input id="product_height" type="text" pattern="[\d,]*(\.[\d,]+)?" class="form-control ignore-invalid" value="0.00"><span class="input-group-addon">in.</span></div>
</fieldset>
</div>
</div>
</div>
</div>
<h5>How do you want to determine shipping cost?</h5>
<fieldset class="form-group">
<div class="form-check"><label for="product_shipping_configuration_use_shipping_method" class="form-check-label custom-control custom-radio" id="label-product_shipping_configuration_use_shipping_method"><input id="product_shipping_configuration_use_shipping_method" type="radio" name="shipping_config" aria-labelledby="label-product_shipping_configuration_use_shipping_method" aria-required="false" class="custom-control-input" value="use_shipping_method" checked=""><span class="custom-control-indicator"></span><span class="custom-control-description"><span>Calculate for me using my <a href="/admin/shipping_methods" data-ga="" class="shipping-methods">shipping methods</a></span></span></label></div>
</fieldset>
<fieldset class="form-group">
<div class="form-check"><label for="product_shipping_configuration_free" class="form-check-label custom-control custom-radio" id="label-product_shipping_configuration_free"><input id="product_shipping_configuration_free" type="radio" name="shipping_config" aria-labelledby="label-product_shipping_configuration_free" aria-required="false" class="custom-control-input" value="free"><span class="custom-control-indicator"></span><span class="custom-control-description"><span>This item always ships <strong>free</strong></span></span></label></div>
</fieldset>
<fieldset class="form-group">
<div class="form-check"><label for="product_shipping_configuration_per_item" class="form-check-label custom-control custom-radio" id="label-product_shipping_configuration_per_item"><input id="product_shipping_configuration_per_item" type="radio" name="shipping_config" aria-labelledby="label-product_shipping_configuration_per_item" aria-required="false" class="custom-control-input" value="per_item"><span class="custom-control-indicator"></span><span class="custom-control-description">Specify a shipping fee for this item</span></label></div>
</fieldset>
</div>
</div>
</div>
我对此有一个问号,但没有答案对我有用,所以我仍然应该提出一个新问题,对吗?
我有这段代码可以遍历链接列表,以使我的机器人可以打开和编辑产品。在此示例中,“棕色”类别中的任何产品。
当到达“ FindElementById(“ product_weight”)”时,出现“元素不可交互”错误。
任何帮助将不胜感激。还附有HTML。
Dim bot As New WebDriver
Dim wb As Workbook
Dim wat As Worksheet
Dim urlBase As String
Dim x As Variant
Set wb = ThisWorkbook
Set wat = wb.Sheets("automate WAT")
urlBase = "https://329902a6-3ae5-4c13-b329-df1f92b14ba8.onlinestore.godaddy.com/admin/products/"
with wat 'spreadsheet with links
For Each x In Range(.Range("A2"), .Range("A" & .Rows.Count).End(xlUp))
If InStr(x.Offset(0, 2).Value, "brownie") > 0 Then
bot.Get urlBase & x.Value & "/edit"
Application.Wait (DateAdd("s", 5, Now))
'bot.FindElementById("Shipping").Click
Set navLinkList = bot.FindElementsByCss("button")
For Each item In navLinkList
If item.Text = "Shipping" Then
item.Click
Exit For
End If
Next item
Application.Wait (DateAdd("s", 5, Now)) 'to make sure the fields are ready to receive data
With bot
'.FindElementByXPath("//input[@id='product_weight']").SendKeys ("4.00")
'.FindElementByCss("#product_weight").SendKeys ("4.00")
.FindElementById("product_weight").SendKeys ("4.00")
.FindElementById("product_depth").SendKeys ("12.00")
.FindElementById("product_width").SendKeys ("12.00")
.FindElementById("product_height").SendKeys ("8.00")
.FindElementById("Label-product_shipping_configuration_use_shipping_method").Click
End With 'bot
For Each item In navLinkList
If item.Text = "Save" Then
item.Click
Exit For
End If
Next item
Application.Wait (DateAdd("s", 5, Now))
End If
Next x
End With 'wat