PDA

View Full Version : Automating Internet Explorer / Interacting with HTML class question



damainkilla
05-09-2017, 12:05 PM
I can't disclose the URL because it's an internal application but I can disclose screenshots of the relevant chunk of HTML code.

I'm trying to change the address, and if I was to do this manually, I'd first click clear address, type in a zip code, click save, and the application is smart enough to be able to fill out the city and state. The actual address is never really needed. So I'm trying to automate this process.

Here's the screenshot of the address box


19112
This is the screenshot of the HTML chunk when nothing is typed in manually and when the zip code (in this case 28816) is automated.

19114

This is the screenshot of the HTML chunk when I'm actually manually typing in something into the zip code box with my keyboard.

19113

Notice the only difference between the 2 chunks of HTML code is the class for the input element where name is zip. I tried to change the class with my code in VBA (looping through the HTML, find the input tag that has name as zip, and then try to set the class attribute/property to "form-control ng-valid ng-dirty ng-valid-parse ng-touched") but it didn't work. I can post my VBA chunk of code if needed.

Is there a way to do this? Changing the element of an input tag in HTML? Or is there a workaround this? Thanks!