Closed exoego closed 4 years ago
https://travis-ci.org/unic/ScalaWebTest/jobs/650286515#L18177
info] org.scalawebtest.integration.gauge.VariablesInGaugeDefinitionSpec ABORTED
[info] The code passed to eventually never returned normally. Attempted 231 times over 5.003468278000001 seconds. Last failure message: Javascript is not enabled for this HtmlUnitDriver instance. (Login.scala:63)
Any help ? 🤔
Thank you for that valuable PR, you just made my day. I'll look into the issue next week.
The problem is caused by https://github.com/scalatest/scalatest/commit/15290627f49c0cdbabcd2ca08dbfaa5d48209759
Due to this change, changing the value of a org.scalatestplus.selenium.WebBrowser.ValueElement requires JavaScript to be enabled, for all WebDrivers, that could execute JavaScript.
@exoego Enabling JavaScript during HtmlUnitDriver initialization is not possible, as it is managed by the loginConfig
.
I anyway think we should not force our users to activate JavaScript during login, when using org.scalawebtest.core.FormBasedLogin. HtmlUnit is not the most reliable thing to execute JavaScript, as it is based on Rhino.
I will raise an issue with scalatestplus-selenium to understand why they made that change. One option which we have, would be to use
click on username_fieldname
emailField(username_fieldname).underlying.sendKeys(username)
click on password_fieldname
pwdField(password_fieldname).underlying.sendKeys(password)
in org.scalawebtest.core.FormBasedLogin
@DaniRey Applied the workaround and now CI is all green !!
@exoego Great and thank you.
Let's wait for feedback on scalatest/scalatestplus-selenium#10 before proceeding with this PR. I want to avoid having an issue in ScalaWebTest, which ScalaTest solved when using JavaScript to check the current value of a form field. As soon as we understand the motivation behind this change, we can make an informed decision.
Closing since superseded by #111
Closes #106
"org.scalatestplus" %% "selenium-2-45"
artifact, which is separated from scalatest core artifact.