Вы можете попробовать:
>>> string = "test test test test"
>>> for index,value in enumerate(string):
if string[index:index+(len("test"))] == "test":
print index
0
5
10
15
Поскольку getElementsByName возвращает коллекцию, вы можете получить к ним доступ с помощью индекса nos
IE.Document.getElementsByName("firstname")(0).Value = "John"
ИЛИ
Set Fname = IE.Document.getElementsByName("firstname")(0)
Fname.Value = "John"
ИЛИ
[112 ]
ИЛИ
IE.Document.querySelector("#input-text-view328").Value = "John"