your text
Sub Logon()
Dim obj As New PhantomJSDriver 'PHANTOMdriver
obj.Start "PhantomJS", ""
With obj
.Get "https://ess.comuninow.net/mvc/Time/Punch"
End With
obj.FindElementByXPath("//input[@formcontrolname='usernameControl']").SendKeys ("0101")
obj.FindElementByXPath("//input[@formcontrolname='passwordControl']").SendKeys ("9999")
obj.FindElementById("punchKind").Click
End Sub
Error 7
NoSuchElementError
Element not found for
XPath=//input[@formcontrolname=’usernameControl’]
Which is odd, because it works with the ChromeDriver (same code)
Thank you
Bruno
I’ve changed the driver to Chrome, it works perfectly then.
New contributor
Bruno Peene is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.