コーディング中Selenium on Pythonを使用しているWellGosh.comのカート機能に追加します。Seleniumを使用してボタンをクリックしようとするとエラーが発生する
カートに追加して自分のアカウントにログインして正しい配送先住所にアクセスするための正しいサイズを取得していますが、配送方法(fedex)を確認しようとすると続行をクリックできませんボタン。ここで
は、チェックアウトするコードの例を次に示します。
def Checkout():
#brings you to your cart
driver.get('https://wellgosh.com/checkout/cart')
#clicks to checkout
checkout=driver.find_element_by_xpath('//*[@id="shopping-cart-table"]/tfoot/tr/td/div[2]/a')
checkout.click()
#Log in
login=driver.find_element_by_xpath('//*[@id="login-email"]')
login.send_keys(e_mail)
password=driver.find_element_by_xpath('//*[@id="login-password"]')
password.send_keys(Pass)
LogIn=driver.find_element_by_xpath('//*[@id="checkout-step-login"]/div/div[2]/div/button')
LogIn.click()
cont=driver.find_element_by_xpath('//*[@id="billing-buttons-container"]/button')
cont.click()
driver.implicitly_wait(100)
element = driver.find_element_by_xpath('//*[@id="shipping-method-buttons-container"]/button')
element.click()
私はこのエラーを取得しています:
selenium.common.exceptions.ElementNotVisibleException: Message: element not visible
これは、HTMLコードの抜粋です:
</script>
</div>
<div class="buttons-set" id="shipping-method-buttons-container">
<p class="back-link"><a href="#" onclick="checkout.back(); return false;"><i class="fa fa-chevron-left plain"></i>Back</a></p>
<button type="button" class="button btn-continue" onclick="shippingMethod.save()">Continue</button>
<span id="shipping-method-please-wait" class="please-wait zoooooom" style="display:none;">
<i class="fa fa-cog fa-spin plain"></i>
</span>
</div>
</form>
ので、続けるボタンの親要素のidは、このIDでは「課金・ボタン・コンテナ」である場合、あなたのHTMLスニペット? –