I've had a hard time getting the function IsElementPresent to work, im using selenium with chrome. I just cant for the life of me figure out the correct way to use it, it always returns an error.
My objective with this is for the script to wait until the page had loaded/a certain element has been found before it continues. Any help is deeply appreciated!
Code: Select all
driver := ChromeGet()
if driver.IsElementPresent(By.Xpath("//input[@name='SearchIdentifierValue']"))
{
msgbox 2
}
else
{
msgbox 1
}
ChromeGet(IP_Port := "127.0.0.1:9222") {
driver := ComObjCreate("Selenium.ChromeDriver")
driver.SetCapability("debuggerAddress", IP_Port)
driver.Start()
return driver
}