0
Help using JS to ācopy/pasteā on website
Iām trying to reference text elements on a website and then use them to fill in the websiteās form fields. Currently Iām missing a basic execute/run program command. I also need help successfully referencing the specified html elements. Thanks! Hereās my basic approach: document.getElementById('FormField').value =document.getElementsByClassName('ReferenceText').innerHTML Hereās the full code (JavaScript and the relevant sections of html). https://code.sololearn.com/WBg8Oos528jP/?ref=app
3 Answers
+ 1
https://code.sololearn.com/WBaS00dsbVKQ/?ref=app
Is this what you are trying?
Check code inside script on html
If is , you was set value to be string not exual value, also when you use class, you got array thats whay you need to access using indexes.
+ 1
Iāll have to double check it on my macās automator tomorrow but I think you fixed the two problems I was having. Thanks Sanja!!!
+ 1
Also if you dont know exacly index you can console.log and check, but much better is to use id for selecting elements