webtools icon indicating copy to clipboard operation
webtools copied to clipboard

Suggestion: verify connection to browser after InstallWebUnit[]

Open ssmit1986 opened this issue 6 years ago • 5 comments

Today I found an issue where WebUnit would throw mysterious errors. After some digging, it turned out that the system running WebUnit did not have permissions to use the command line, so it could never launch the web driver.

In the code of InstallWebUnit[] there is the line Quiet[URLFetch[webDriverBaseURL<>"/status"]] that checks if the process is already running. Maybe this check should be performed again after launching the driver to check if it really did launch.

ssmit1986 avatar Mar 02 '18 10:03 ssmit1986

Thanks. I will rework this functionality. Also note that I renamed the package to WebTools to avoid problems with the upcoming 11.3 release (which includes a modified copy of WebUnit)

arnoudbuzing avatar Mar 02 '18 15:03 arnoudbuzing

Please note that I had to rename the package from WebUnit to WebTools (to avoid a compatibility issue with an upcoming release of 11.3)

This also means you have to use InstallWebTools instead of InstallWebUnit

arnoudbuzing avatar Mar 02 '18 15:03 arnoudbuzing

So in Mathematica 11.3 we would have current WebUnit(or WebTools) functionalities embedded?

wjxway avatar Mar 02 '18 15:03 wjxway

11.3 has a modified version of WebUnit included, yes. This is why I need to rename this repo (they are going to diverge). But in 11.3 the syntax is different, so you have to decide what will work for you:

https://reference.wolframcloud.com/cloudplatform/ref/externalevaluationsystem/WebDriverChrome.html

arnoudbuzing avatar Mar 02 '18 16:03 arnoudbuzing

Use this:

PacletInstall["https://github.com/arnoudbuzing/webtools/releases/download/v0.1.0/WebTools-0.1.0.paclet"]

if you want to continue this paclet

arnoudbuzing avatar Mar 05 '18 15:03 arnoudbuzing