Was this page helpful?

SetWebOption

    Table of contents

    Description

    This function allows to setup Web options such as "WEB_WAIT_FOR_COMPLETED", "WEB_SEARCH_TIMEOUT", "WEB_CACHE_DISABLED", etc. Want more possible options, search SetWebOption in your NTBR help page.

    Parameter(s)

    Bool SetWebOption(Option as String, ParamStr as STRING, ParamInt as Int)    --> For Windows CE

    OR

    Bool SetWebOption(Option as String, DataStr as STRING, DataInt as STRING)  --> For WTC CE

    Example(s)

    Here describes some possible cases to set options for PlayNavigation() & CheckDocumentString() functions :


    CASE1 (code generated by wizard):

    This is the default case using script generation wizard. The third parameter "2" as integer in the funtion SetWebOption() defines that the function PlayNavigation will not pass to next code line until the webpage is compeletly loaded (with a 60 seconds' timeout as default value).

    reference to undefined name 'syntax' Une exception de type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' a été levée. (click for details)

    Then, the CheckDocumentString() function will do the check with a 0 ms timeout (same as if you don't use SetWebOption() to setup a timeout value).


    CASE2:

    In this case, the third parameter of SetWebOption() is set as "0". It means that PlayNavigation() won't wait the page to be loaded.

    reference to undefined name 'syntax' Une exception de type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' a été levée. (click for details)

    The function CheckDocumentString(), in this case, will check repeatedly the presence of the criteria during a timeout of 10 seconds.


    CASE3 (CheckDocumentString default timeout):

    This case shows the default timeout value of CheckDocumentString() function when we do not use SetWebOption() to set a timeout value.

    reference to undefined name 'syntax' Une exception de type 'MindTouch.Deki.Script.Runtime.DekiScriptUndefinedNameException' a été levée. (click for details)

    In this case, the CheckDocumentString() function will check repeatedly the presence of the criteria during a timeout of 60/2=30 (half the timeout of the latest PlayNavigation function) seconds.

    Note : In order to use the default timeout value of CheckDocumentString(), you need to set the third parameter of SetWebOption("WEB_WAIT_FOR_COMPLETED", "", 0) as 0.

    See also

     

     

     

     

    Was this page helpful?
    Tag page (Edit tags)
    • No tags
    Pages that link here
    Page statistics
    2969 view(s), 7 edit(s) and 4029 character(s)

    Comments

    You must login to post a comment.

    Attach file

    Attachments