I am making a web-automation script that retrieves text that appears after clicking a button, however the text is inside an input element like:
<input type="TEXT" autocomplete="off" class="DFGUISLE Readonly1" name="Readonly1" id="Readonly1" maxlength="150" readonly="" tabindex="-1" style="dir:ltr; position:absolute; left:276; top:552; width:899; height:24; ">
Problem is, when I try:
output_fields = driver.find_elements(By.TAG_NAME, 'input')
for output_field in output_fields:
print(driver.execute_script("return arguments[0].value", output_field))
>> (blank)
print(driver.execute_script("return arguments[0].innerText", output_field))
>> (blank)
print(output_field.get_attribute('value').encode('utf-8'))
>> b''
print(output_field.get_attribute('innerText').encode('utf-8'))
>> b''
I get blank outputs. Any clue on how to get the text from these input elements? Like, in this case, I am looking for the
Merk en type : AUDI
EDIT 1:
I also noticed that in Network Logger, after I click "Opvragen", the text can be seen from a response as follows:
parent.instanciate(new Array('EntryField','1689296692','CMV_WD_PBL01_CONSULT_STATUS','Readonly1',"Merk en type : AUDI")).setAttributes(false,'','','none','noop',null,null);
EDIT 2:
If you would like to try,
Link: mobilit.fgov.be/WebdivPub/wmvpstv1 and put WAUZZZ8VXE1009546 into Chassisnummer then press Opvragen
