I try to set the proxy as follows, but failed:
In[209]:= (*
https://mathematica.stackexchange.com/questions/242495/chrome-driver-error-in-startwebsession
$DefaultProxyRules
*)
(*Set a proxy specification for the HTTP protocol:*)
origUseProxy=$DefaultProxyRules["UseProxy"];
origHttpProxy=$DefaultProxyRules["HTTP"];
origHttpsProxy=$DefaultProxyRules["HTTPS"];
origSocksProxy=$DefaultProxyRules["Socks"];
$DefaultProxyRules["HTTP"] = {"127.0.0.1", 8080};
$DefaultProxyRules["HTTPS"] = {"127.0.0.1", 8080};
$DefaultProxyRules["Socks"] = {"127.0.0.1", 18889};
(*Because the "UseProxy" value acts like a master switch, that HTTP proxy specification will not take effect unless "UseProxy" is set to Manual:*)
$DefaultProxyRules["UseProxy"] = Manual;
In[224]:= (*Use Visible->False to run the browser in "\[AliasDelimiter]ess" mode, where the browser window does not actually become visible:*)
(*session = StartWebSession["Chrome", Visible -> False];*)
session = StartWebSession[]
page = WebExecute[
"OpenPage" ->
"https://www.cryst.ehu.es/cgi-bin/cryst/programs/nph-getgen?list=new&what=gen&gnum=227"];
inputs = WebExecute[session, "LocateElements" -> "Tag" -> "Input"];
WebExecute[session, "ClickElement" -> Last@inputs];
anchors = WebExecute["LocateElements" -> "Tag" -> "a"];
Select[WebExecute["PageHyperlinks"], StringContainsQ["gnum="]]
DeleteObject[session];
Out[224]= Failure["StartWebSession", <|"MessageTemplate" -> "Unable \
to start `driver` driver process",
"MessageParameters" -> <|"driver" -> "Chrome"|>|>]
During evaluation of In[224]:= URLRead::invhttp: Empty reply from server.
During evaluation of In[224]:= WebExecute::argr: The arguments for WebExecute are not valid.
During evaluation of In[224]:= Last::normal: Nonatomic expression expected at position 1 in Last[$Failed].
During evaluation of In[224]:= WebExecute::argr: The arguments for WebExecute are not valid.
During evaluation of In[224]:= URLRead::invhttp: Empty reply from server.
During evaluation of In[224]:= URLRead::invhttp: Empty reply from server.
During evaluation of In[224]:= StringContainsQ::strse: String or list of strings expected at position 1 in StringContainsQ[gnum=][<|MessageTemplate->`command` failed.,MessageParameters-><|command->PageHyperlinks|>|>].
Out[229]= Failure[]
During evaluation of In[224]:= DeleteObject::nim: Cannot delete object Failure[\[WarningSign] Message: Unable to start Chrome driver process
Tag: StartWebSession
].
Any hints for fixing this problem?
P.S. This question is initially posted here. But according to Daniel Lichtblau's suggestion, it is appropriate to start a new discussion.
Regards, Zhao