# Using WebUnit with ParallelTable

Is it possible to use OpenWebPage from WebUnit in ParallelTable? For example such as in:

Needs["WebUnit"]
InstallWebUnit[]
StartWebSession[];

pages = {"www.wolfram.com", ... }
ParallelTable[
OpenWebPage[pages[[i]]];
html = GetPageHtml[];
, {i, Length@pages}
]


I can start multiple browsing windows by running several StartWebSession[] but then how to dedicate a single window to each core?

• This is a question that I am certain the answer is yes to, having modified the source code for WebUnit for my own purposes at various points, but Arnoud would be best able to answer. Try asking on Wolfram Community as I expect he spends more time there. As a first, clumsy attempt try a ParallelEvaluate[Needs["WebUnit"];InstallWebUnit[];StartWebSession[]]. I believe you can do all this from a single web session though. – b3m2a1 Dec 19 '17 at 0:21
• @b3m2a1 I'll ask. Your solution opens a lot of windows; do you know how to close a browser window? StopWebSession does not and I did not see any similar commands in the doc. – anderstood Dec 19 '17 at 16:55
• I can’t remember off the top of my head and don’t have the time to dig now, but I believe if you dig a bit there’s a way to get the process ID which you could kill (I don’t think it uses ProcessObject) or alternately I think there’s a way to tell it to close itself. I certainly have done it but can’t remember how. – b3m2a1 Dec 19 '17 at 16:56
• @b3m2a1 OK thank you. Anyway that's probably so much less efficient than a clean approach. I'll update if I get anything interesting. – anderstood Dec 19 '17 at 16:59
• Cross-posting : community.wolfram.com/groups/-/m/t/1250232 – anderstood Dec 19 '17 at 17:05