title: URL must be a string selenium - selenium.common.exceptions.InvalidArgumentException: Message: invalid argument: 'url' must be a string
body: <p>I am making a script to automate the buying process of clothes by making requests but I get the error saying that url must be a string without specific error in the title ill put the code below im just not sure which url it is referincing but any help with this would really be appreciated so thank you - arthur</p>
  <pre><code>from selenium.webdriver.common.keys import Keys
  from selenium.common.exceptions import NoSuchElementException
  from selenium.common.exceptions import ElementNotInteractableException
  from selenium.webdriver.common.by import By
  import random
  import time
  from selenium.webdriver.chrome.options import Options
  from webdriver_manager.chrome import ChromeDriverManager
  import requests
  import webbrowser
  from discord_webhooks import DiscordWebhooks
  from datetime import datetime
  
  class Profile:
  
    def __init__ (self, profileName, name, email, tel, address1, address2, zip, city, state, country, number, month, year, cvv):
  
        self.profileName = profileName
        self.name = name
        self.email = email
        self.tel = tel
        self.address1 = address1
        self.address2 = address2
        self.zip = zip
        self.city = city
        self.state = state
        self.country = country
        self.number = number
        self.month = month
        self.year = year
        self.cvv = cvv
  
  class Item:
  
    def __init__ (self, product, color, size):
  
        self.product = product
        self.color = color
        self.size = size
  
  chrome_options = Options()
  chrome_options.add_argument(&quot;--headless&quot;)
  profiles = [Profile]
  webhook = DiscordWebhooks('empty for stack overflow')
  headless = False
  
  def lookingForItem():
    print(&quot;Monitoring&quot;)
    testItem = Item(&quot;Acrylic Visor 6-Panel&quot;, &quot;Red&quot;, &quot;N/A&quot;)
    monitor(testItem)
    productLink = findProduct(testItem)
    checkout(productLink, testItem)
  
  def checkout(productLink, item):
    startTime = time.perf_counter()
    userProfile = Profile(&quot;test&quot;, &quot;Test Name&quot;, &quot;test@gmail.com&quot;, &quot;1111111111&quot;, &quot;1 Test St&quot;, &quot;&quot;, &quot;10001&quot;, &quot;New York&quot;, &quot;NY&quot;, &quot;USA&quot;, &quot;4111111111111111&quot;, &quot;08&quot;, &quot;2020&quot;, &quot;111&quot;)
    driver.get(productLink)
    done = False
    delay = 0
    if item.size.lower() != 'n/a' and item.size.lower() != &quot;any&quot;:
        if item.size.lower() == 'random':
            driver.execute_script(&quot;&quot;&quot;var sizePicker = Math.floor(Math.random() * document.getElementById('s').length);
            document.getElementById('s').selectedIndex = sizePicker;&quot;&quot;&quot;)
        else:
            driver.execute_script(&quot;&quot;&quot;for (var i=0; i&lt;document.getElementById('s').length; i++){{
                            if (document.getElementById('s').options[i].text == '{}'){{
                              document.getElementById('s').selectedIndex = i;
                            }}
                          }}&quot;&quot;&quot;.format(item.size))
    while(not done):
        done = addToCart()
    done = False
    while(not done):
        done = goToCheckout()
    driver.execute_script(&quot;&quot;&quot;document.getElementById('order_billing_name').value = '{}';
    document.getElementById('order_email').value = '{}';
    document.getElementById('order_tel').value = '{}';
    document.getElementById('bo').value = '{}';
    document.getElementById('oba3').value = '{}';
    document.getElementById('order_billing_zip').value = '{}';
    document.getElementById('order_billing_city').value = '{}';
    document.getElementById('order_billing_state').value = '{}';
    document.getElementById('order_billing_country').value = '{}';
    document.getElementById('rnsnckrn').value = '{}';
    document.getElementById('credit_card_month').value = '{}';
    document.getElementById('credit_card_year').value = '{}';
    document.getElementsByClassName('iCheck-helper')[1].click();&quot;&quot;&quot;.format(
    userProfile.name, userProfile.email, userProfile.tel,
    userProfile.address1, userProfile.address2, userProfile.zip,
    userProfile.city, userProfile.state, userProfile.country,
    userProfile.number, userProfile.month, userProfile.year, userProfile.cvv))
    print(&quot;Delaying&quot;)
    time.sleep(delay/1000)
    driver.find_element_by_xpath('//*[@id=&quot;orcer&quot;]').send_keys(userProfile.cvv)
    driver.find_element_by_xpath('//*[@id=&quot;cart-cc&quot;]/fieldset/p[2]/label/div/ins').click()
    driver.find_element_by_xpath('//*[@id=&quot;pay&quot;]/input').click()
    #webbrowser.open(&quot;https://www.google.com/recaptcha/api2/anchor?ar=1&amp;k=6LeWwRkUAAAAAOBsau7KpuC9AV-6J8mhw4AjC3Xz&amp;co=aHR0cHM6Ly93d3cuc3VwcmVtZW5ld3lvcmsuY29tOjQ0Mw..&amp;hl=en&amp;v=oqtdXEs9TE9ZUAIhXNz5JBt_&amp;size=invisible&amp;cb=h0o95sjo44ya&quot;)
    print(&quot;Processing&quot;)
    endTime = time.perf_counter()
    finalTime = round((endTime - startTime), 3)
    sendWebhook(productLink, item, finalTime)
  
  def sendWebhook(productLink, item, finalTime):
    webhook.set_content(color=0xCC3333,title='cheebBot1.0')
    webhook.add_field(name='Status', value='**Payment failed!**')
    webhook.add_field(name='Date/Time', value=str(datetime.now()))
    webhook.add_field(name='Item', value='**'+ item.product + '**')
    webhook.add_field(name='Item Link', value=productLink)
    webhook.add_field(name='Color', value=item.color)
    webhook.add_field(name='Size', value=item.size)
    webhook.add_field(name='Checkout Time', value=str(finalTime) + ' s')
    webhook.send()
  
  def findProduct(item):
    container = driver.find_element_by_xpath('//*[@id=&quot;container&quot;]').find_elements_by_class_name('inner-article')
    for article in container:
        if article.find_element_by_class_name(&quot;product-name&quot;).find_element_by_class_name(&quot;name-link&quot;).text == item.product and article.find_element_by_class_name(&quot;product-style&quot;).find_element_by_class_name(&quot;name-link&quot;).text == item.color:
            return(article.find_element_by_class_name(&quot;product-name&quot;).find_element_by_class_name(&quot;name-link&quot;).get_attribute(&quot;href&quot;))
  
  def monitor(item):
    try:
        driver.find_elements_by_xpath('//div[contains(text(), &quot;' + item.product + '&quot;)]')
    except NoSuchElementException:
        driver.refresh()
        monitor(item)
    return
  
  def productListed(product):
    try:
        driver.find_element_by_xpath(&quot;//*[contains(text(), &quot; + product + &quot;)]&quot;)
    except NoSuchElementException:
        time.sleep(.5)
        driver.refresh()
        productListed(product)
    return
  
  def addToCart():
    try:
        driver.find_element_by_xpath('//*[@id=&quot;add-remove-buttons&quot;]/input').click()
    except ElementNotInteractableException:
        time.sleep(.01)
        #driver.refresh()
        return False
    print(&quot;Adding to cart&quot;)
    return True
  
  def goToCheckout():
    try:
        driver.find_element_by_xpath('//*[@id=&quot;cart&quot;]/a[2]').click()
    except ElementNotInteractableException:
        time.sleep(.01)
        return False
    print(&quot;Checking out&quot;)
    return True
  
  if __name__ == &quot;__main__&quot;:
    if headless:
        driver = webdriver.Chrome(ChromeDriverManager().install(), chrome_options=chrome_options)
    else:
        driver = webdriver.Chrome(ChromeDriverManager().install())
    driver.get(&quot;https://www.supremenewyork.com/shop/shirts/ziq2otwjc/c9qzbgrlm&quot;)
    lookingForItem()
  
  #class euProfile: 
  #   def __init__(self, name, age):
        
  
  </code></pre>