Empresas
Empleos
  • Sobre nosotros
  • Soluciones
    • Publicación de vacantes
      Publica tu vacante y recibe candidatos calificados en 48h.
    • Evaluación de candidatos
      500+ pruebas técnicas y psicológicas, más anti-fraude.
    • Headhunting
      Búsqueda ejecutiva a la medida de principio a fin.
    • Nómina + EOR
      Dispersión de nómina y EOR en más de 15 países de LATAM.
  • Precios
  • Empleos

0

275
Vistas
Filling a text box in an overlayed element with Selenium (Python)

I am building a stock checker and need to enter a postcode into the text box on https://www.argos.co.uk/basket, but seem to have come across a hidden element that the normal sendkeys method returns an ElementNotInteractableException on. I have therefore tried using execute_script with setAttribute which runs without error, but still does not fill the text box.

from selenium import webdriver as wd
import chromedriver_binary

wd = wd.Chrome()
wd.implicitly_wait(5)

wd.get("https://www.argos.co.uk/search/ps5/category:824671/")

accept_cookies = wd.find_element_by_xpath('//*[@id="consent_prompt_submit"]')
accept_cookies.click()

add_to_cart_button = wd.find_element_by_xpath('//*[@id="findability"]/div/div[7]/div/div[5]/div[5]/div[3]/div/div/div[2]/button')
add_to_cart_button.click()

reject_insurance = wd.find_element_by_xpath('//*[@id="findability"]/div/div[3]/div/div/div[1]/footer/div/div/a')
reject_insurance.click()

wd.execute_script('document.querySelector("#basket-FulfilmentSelectorForm").setAttribute("value", "ABC123")')

Interestingly the 'delivery' button element can be interacted with as follows:

wd.execute_script('document.querySelector("#basket-FulfilmentSelectorForm-deliverButton").click()')

Any help is greatly appreciated.

about 4 years ago · Juan Pablo Isaza
Responde la pregunta
Encuentra empleos remotos

¡Descubre la nueva forma de encontrar empleo!

Top de empleos
Top categorías de empleo
Empresas
Publicar vacante Precios Comercial
Legal
Términos y condiciones Política de privacidad
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomiéndame algunas ofertas
Necesito ayuda