Trying to automate form submission with selenium, but encountering JavaScript issues causing exceptions. Instead of directing submit to the form action, Selenium is redirecting it to localhost. Any help on why this is happening and how to fix it?
Here's the form:
<!DOCTYPE html>
<html lang="en" dir="ltr">
...
</html>
Java Code:
private final static String PF_BASE_URL = "https://machine.place.domain.com";
...
Stacktrace:
Exception in thread "main" org.openqa.selenium.WebDriverException: com.gargoylesoftware.htmlunit.ScriptException: Exception invoking submit
...