Advertisement
Guest User

Untitled

a guest
Nov 21st, 2014
155
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.79 KB | None | 0 0
  1. public void CheckUncheckSendNotificationCheckBox(bool shouldBeChecked = true)
  2.         {
  3.             Wait4Element(sendNotitficationCheckbox);
  4.             bool res = sendNotitficationCheckbox.GetAttribute("class").Contains("checked");
  5.             IWebElement checkbox = sendNotitficationCheckbox.FindElement(By.Id("globalTourNotification"));
  6.             Console.Out.WriteLine("res = " + res);
  7.             if (shouldBeChecked)
  8.             {
  9.                 if (!res)
  10.                 {
  11.                     checkbox.Click();
  12.                     saveButton.Click();
  13.                 }
  14.             }
  15.             else
  16.             {
  17.                 if (res)
  18.                 {
  19.                     checkbox.Click();
  20.                     saveButton.Click();
  21.                 }
  22.             }
  23.         }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement