@mratsim Thank you for your answer! That's the first time I heard Webdriver! 
Thank you!

However, when I execute bellow code, it occurs errors:

[Code] 
    
    
    import webdriver
    
    var driver = newWebDriver("http://example.com";)
    
    var session = createSession(driver)
    
    
    Run

[Errors] 
    
    
    Hint: operation successful (53276 lines compiled; 2.465 sec total; 92.52MiB 
peakmem; Debug Build) [SuccessX]
    Hint: C:\project\nim\web_capture.exe  [Exec]
    web_capture.nim(5)       web_capture
    webdriver.nim(44)        createSession
    httpclient.nim(1248)     getContent
    Error: unhandled exception: 404 Not Found [HttpRequestError]
    Error: execution of an external program failed: 
'C:\project\nim\web_capture.exe '
    
    
    Run

And if access https, it occurs another error:

[Code] 
    
    
    import webdriver
    
    var driver = newWebDriver("https://nnahito.com/";)    # This is my blog site.
    
    var session = createSession(driver)
    
    
    Run

[Error] 
    
    
    Hint: operation successful (54457 lines compiled; 1.527 sec total; 
92.547MiB peakmem; Debug Build) [SuccessX]
    Hint: C:\project\nim\web_capture.exe  [Exec]
    web_capture.nim(5)       web_capture
    webdriver.nim(45)        createSession
    json.nim(828)            parseJson
    json.nim(820)            parseJson
    json.nim(809)            parseJson
    parsejson.nim(531)       raiseParseErr
    Error: unhandled exception: input(1, 1) Error: { expected [JsonParsingError]
    Error: execution of an external program failed: 
'C:\project\nim\web_capture.exe '
    
    
    Run

It succeeded to compile both program. However failed to execute both program.

Why the error occurred? 

Reply via email to