NetworkResponseModifier.Clear Method

Definition

Clears the stack of all the Network Response Modifier rules.

public void Clear()

Examples

Tabs.SetSize (1820, 263);
DMBrowser tab0 = null;
Step (1, "adidas Official Website | adidas US - https://www.adidas.com/us");
tab0 = Tabs.NewTab ();
// Shadow all responses from https://www.adidas.com/us/women-black_friday
NetworkResponseModifier.Shadow ("*women-black_friday")
tab0.GoTo ("http://adidas.com/");
Tabs.SetSize (1820, 496);
Step (2, "Image Operation");
tab0.PictureAssert (PictureList [0], 0.92, "1min".ToDuration ());
tab0.Element ("//A[normalize-space(@TITLE)=\"SHOP WOMEN\"]//SVG", "//A[normalize-space(@TITLE)=\"SHOP WOMEN\"]/SVG", "//SPAN[normalize-space()=\"SHOP WOMEN\"]/..//SVG").Click ();
Step (3, "Up to 50% Off adidas Women's Black Friday 2021 Deals - https://www.adidas.com/us/women-black_friday");
Tabs.SetSize (1820, 222);
tab0.Element ("//H1[normalize-space()=\"JOIN THE CLUB. GET REWARDED WITH A 15% DISCOUNT\"]", "//H1[normalize-space(text())=\"JOIN THE CLUB. GET REWARDED WITH A 15% DISCOUNT\"]", "/HTML/BODY/DIV[2]/DIV/DIV[2]/DIV/DIV/DIV/DIV[2]/DIV/DIV/H1").Click ();
Tabs.SetSize (1820, 317);
tab0.Element ().Click ();
//Overwrite any errors from https://www.adidas.com/ with OK 
NetworkResponseModifier.OK(“*adidas”)
tab0.Span ("(//SPAN[normalize-space(text())=\"New Arrivals\"])[3]", "//SPAN[normalize-space()=\"LEGO® Collection\"]/../../preceding-sibling::LI[6]//SPAN[normalize-space()=\"New Arrivals\"]", "//SPAN[normalize-space()=\"LEGO® Collection\"]/../../preceding-sibling::LI[6]//SPAN[normalize-space(text())=\"New Arrivals\"]").Click ();
//Clear the stack of the Network Response Modifier rules
NetworkResponseModifier.Clear()
Step (4, "Kids New Arrivals: Clothing, Shoes & Accessories | adidas US - https://www.adidas.com/us/kids-new_arrivals");
tab0.Para ("//P[normalize-space()=\"Superstar Pure Shoes\"]", "//P[normalize-space(text())=\"Superstar Pure Shoes\"]", "(//P[normalize-space(text())=\"Youth Originals\"])[2]/preceding-sibling::P[1]").Click ();
tab0.Image ("//P[normalize-space()=\"Trefoil Tee\"]/../preceding-sibling::DIV[1]/DIV/DIV/DIV/DIV[2]/DIV[3]/A/IMG", "(//DIV[normalize-space()=\"$25\"])[last()]/../../../../following-sibling::DIV[1]/DIV/DIV/DIV/DIV[2]/DIV[3]/A/IMG", "/HTML/BODY/DIV[2]/DIV/DIV[1]/DIV/DIV/DIV/DIV[3]/DIV/DIV[2]/DIV/DIV/DIV[2]/DIV[1]/DIV/DIV[6]/DIV/DIV/DIV/DIV/DIV/DIV[2]/DIV/DIV/DIV/DIV[2]/DIV[3]/A/IMG").Click ();