CompiledScript.SetCookieForUrl Method


Adds browser cookies with the specified “name-value” pair to all requests to the provided domain or hostname.

public void SetCookieForUrl(string url, string name, string value)


 url  string

 name  string

 value  string

Use “*” as a wildcard for a subdomain name. The URL string might contain a full domain or subdomain name.


DMBrowser tab1 = null;
Step (1, "Dotcom-Monitor: Website Monitoring and Performance Testing -");
tab0 = Tabs.NewTab ();
//Add the specified cookies to all requests to DM domain 
tab0.GoTo ("");
SetCookieForUrl ("*", "_dm_tracking_cookie", "67f82a23-c98d-41fb-bc5a-b17f0ba34567");
tab0.Link ("(//A[normalize-space(text())=\"Pricing\"])[1]", "(//LI[@ID=\"mega-menu-item-2198\"])[1]//A[normalize-space()=\"Pricing\"]", "(//LI[@ID=\"mega-menu-item-2198\"])[1]//A[normalize-space(text())=\"Pricing\"]").Click ();
Step (2, "Pricing - Dotcom-Monitor -");
tab0.Navigating ("");