Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

84
Views
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 answers
Answer question

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 Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!