Long story short, I am trying to create the back end of a sneaker bot for the Kith website (https://kith.com/). I am using the selenium library and its webdriver in order to web scrape and capture the website's elements. Everything seems to be fine until I reach the credit card input section. Once I try and copy the xpath for the input boxes (cc number, cvv, etc) it returns an error.
selenium.common.exceptions.NoSuchElementException: Message: no such element:
Unable to locate element: {"method":"xpath","selector":"'//*[@id="number"]"}
Is there perhaps a feature within Html that disables you from grabbing and typing into this input box using the bot, or am I doing something wrong? If this is a legitimate feature, any bypass options?
My code to grab the input boxes are:
driver.find_element_by_xpath('//*[@id="number"]').send_keys(keys['cc_number'])
#Name on Card
driver.find_element_by_xpath('//*[@id=name"]').send_keys(keys['name_on_card'])
#exp date
driver.find_element_by_xpath('//*[@id="number"]').send_keys(keys['card_expiration_date'])
#security code
driver.find_element_by_id('//*[@id="number"]').send_keys(keys['card_cvv'])
This is the raw Html code for the CC # input box:
<input autocomplete="cc-number" id="number" name="number" type="tel" aria-describedby="error-for-number tooltip-for-number" data-current-field="number" class="input-placeholder-color--lvl-22" placeholder="Card number" style="color: rgb(51, 51, 51); font-family: Roboto, sans-serif; padding: 0.94em 0.8em; transition: padding 0.2s ease-out 0s;">
and then this is what value is copied every time I use its XPATH code //*[@id="number"]