I’ve been working with DOM to be able to automatically populate the fields on a web page (see screen capture #1). I used iWB2 Learner to get the names of the fields and it is going well, and I have been able to access and populate/write all the input fields, such as:
(using wb := IEGet("Calendar - Bookeo") from Jethreow)
Code: Select all
wb.Document.All.cardType.Value := "VISADEBIT"
wb.Document.All.cardNumber.Value := "1234123412341234"
wb.Document.All.cardHolderName.Value := "John Smith"
wb.Document.All.expiryMonth.Value := "12"
wb.Document.All.expiryYear.Value := "2021"
wb.Document.All.cvv.Value := "999"
However, I am trying to access/read the “dueNow” element (screen capture #2) via:
Code: Select all
var1 := wb.Document.All.dueNow.value
but have been unsuccessful.
Whereas this works:
Code: Select all
var1 := wb.Document.All.cardHolderName.Value
QUESTION: Is there a different way to read static text elements vs. input elements? Or is it because it is in a different part of the page (maybe a different form)? Or something else I am doing wrong? Thanks!