Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

186
Visualizações
Selenium-webdriver, I cannot go to the modal window

I am new to automated testing. Faced such a problem, earlier in the test I go to the Iframe window to enter the "test card" data. Instead of "success page", a modal window is displayed on which I need to click. Selenium swears.

..............

await driver.switchTo().frame(driver.findElement(By.xpath('//*[@id="solid-payment-form-iframe"]'))).then.....

..............................

`await button46.click().then(async function() {
  bot.sendMessage(-100********, land+"\nTest completed!!✅");
  console.log(button46.click,'SubmitButton - done');
  
  return true//it existed
})  
await driver.switchTo().defaultContent();
 const number = await driver.wait(
  until.elementLocated(By.xpath('//*[@id="specialOffer"]/div/div[2]/div[1]/a'))
  // (By.xpath('//*[@id="specialOffer"]/div/div[2]/div[1]/a'))
  , 20000).then(number => {
return driver.wait(
  until.elementIsEnabled(number), 20000)})await number.click();`
   

This is what the console writes: ElementClickInterceptedError: element click intercepted: Element <a href="************************************* is not clickable at point (960, 536). Other element would receive the click: <iframe id="solid-payment-************************

Selenium webdriver javascript remote server - selenoid(aerokube)

about 4 years ago · Juan Pablo Isaza
2 Respostas
Responde à pergunta

0

To click an element with selenium element.click the element should be visible and clickable, but your element might be outside of the visible area or might be behind a dialog box. Try clicking by injecting javascript. I have worked with the Python version of selenium so see python code and convert according to your need:

driver.execute_script("arguments[0].click()", button46)
about 4 years ago · Juan Pablo Isaza Relatório

0

FIX PROBLEM:

   await driver.sleep(5000)
  const number1 = await driver.wait(until.elementLocated(By.xpath('//*[@id="specialOffer"]/div/div[2]/div[1]/a')))
  await driver.executeScript("arguments[0].click()", number1)```
about 4 years ago · Juan Pablo Isaza Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda