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

83
Visualizações
How can I interact with this span class? This is for an auto fill chrome extension

I'm trying to have my chrome extension automatically select a drop down option. I'm not sure if this is the best way to do it, but for my first step, I tackle the following html (top html is before selected state, second html line is after the selection is made):

html:

<md-select ng-disabled="!editIAreas || applicationReview.readOnly" ng-model="ia.iRecommendation" name="iRecommendation" aria-label="iRecommendation" 
<md-select ng-disabled="!editIAreas || applicationReview.readOnly" ng-model="ia.iRecommendation" name="iRecommendation" aria-label="iRecommendation: No" 

javascript plugin to change the first attribute:

document.querySelector('[aria-label="iRecommendation"]').setAttribute('aria-label', 'iRecommendation: No');

next attribute change:

class="ng-valid ng-touched ng-not-empty ng-dirty" 
class="ng-valid ng-touched ng-not-empty ng-dirty ng-valid-parse" 

changed with:

document.querySelector('[aria-label="iRecommendation"]').setAttribute('class', 'ng-valid ng-touched ng-not-empty ng-dirty ng-valid-parse');

The last thing I need to change (I believe) is this:

<b></b></div></span><span class="md-select-icon" aria-hidden="true"></span></md-select-value></md-select>
<b>Not Qualified</b></div></span><span class="md-select-icon" aria-hidden="true"></span></md-select-value></md-select>

How can I change the state of that? :O Am I even doing this right?

edit: here's more of the last:

<span><div class="md-text"><b>Not Qualified</b></div></span><span class="md-select-icon" aria-hidden="true"></span></md-select-value></md-select>

edit2: so i need to set the text of md-text between <b> and </b> how? I've been trying all day in console

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

0

what a headache. here is the solution:

document.querySelector("#select_value_label_2340 > span:nth-child(1) > div").innerHTML = 'Not Qualified';

I just had to look at the html and copy the js path... and use innerhtml... which may not be secure? idk. it works.

edit: nevermind. it doesn't work anymore. wtf

alright it's even worse than I thought. I'm working with an input container so the html isn't even exposed until I click on the thing. Is there an easier way to do this?

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