CompiledScript.SetCookieForUrl Method


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

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


 url  string

 name  string

 value  string

Use “*” as a wildcard at the beginning or end of the URL string and “?” as a single-letter wildcard.


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 
SetCookieForUrl ("*dotcom-monitor*", "_dm_tracking_cookie", "67f82a23-c98d-41fb-bc5a-b17f0ba34567");
tab0.GoTo ("");
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 ("");