I am trying to make a sneaker bot using selenium and python, so I made a gui using tkinter where the user can enter all their information and then it automatically inputs it into a websites checkout page to speed up the process, but the information that the user enters is not transmitting from the tkinter entry into the text field in the websites checkout section. Here is a link to the website checkout so you can better understand what I am saying. https://www.supremenewyork.com/checkout

And here is the code that i have been trying to use.

from selenium import webdriver
from selenium.webdriver.common.keys import Keys
from tkinter import *
import time

root = Tk()
root.geometry("450x200")

def fetchName(Name):
user = Name.get()
print(user)

def Supreme():
driver = webdriver.Chrome()
driver.get('https://www.supremenewyork.com/shop/bags/hikdqvpos')
driver.find_element_by_xpath('//*[@id="add-remove- 
buttons"]/input').click()
time.sleep(1)
driver.find_element_by_xpath('//*[@id="cart"]/a[2]').click()
driver.find_element_by_xpath('//* 
[@id="order_billing_name"]/'+Name.get())

Name = Entry(root, width = 50, borderwidth = 5)
Name.pack()
Name.get
print(Name)

b = Button(root, text = "Supreme", command = Supreme, width = 12, 
bg = 'gray')
b.place(x = 175, y = 100)

b2 = Button(root, text = "Name", command = fetchName)

root.mainloop()

If anyone has any solutions please enter it down below

0

There are 0 best solutions below