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

102
Visualizações
Change a agSelectCellEditor drop down value using selenium

I am trying to access values in a drop down which when I inspect, nothing is been in element inspector. I confirmed with developer what type of drop down is that he said agSelectCellEditor drop down. We then tried using following Javascript code in console which was changing the drop down values.

var x=document.querySelector("div[aria-colindex='3'][class='ag-cell ag-cell-not-inline-editing ag-cell-auto-height ag-cell-value ag-cell-wrap-text ag-cell-focus']
x.textContent="Custodian"

So that changed the drop down value from default value to Custodian. Now I tried to inject this code in JavaScriptExecutor like this.

JavascriptExecutor js = (JavascriptExecutor)driver;
js.executeScript("var x=document.querySelector(\"div[aria-colindex='3'][class='ag-cell ag-cell-not-inline-editing ag-cell-auto-height ag-cell-value ag-cell-wrap-text ag-cell-focus']\")"
+ "x.textContent=\"Custodian\";");

It is giving me exception org.openqa.selenium.JavascriptException: javascript error: Unexpected identifier

Please help me automating this using Selenium. How to deal with this dropdown?

about 4 years ago · Juan Pablo Isaza
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