Guest User

Untitled

a guest
Feb 25th, 2018
92
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.69 KB | None | 0 0
  1. public void foo(string Comment)
  2. {
  3. WebDriverWait wait = new WebDriverWait(_webdriver, TimeSpan.FromSeconds(10));
  4. var newhouse = wait.Until(x => x.FindElement(By.Id("new_housenum")));
  5. var hiddentElement = newhouse.FindElement(By.CssSelector("div[class='ms-crm-Inline-Validation']"));
  6. string js = "arguments[0].style.display='block';";
  7. ((IJavaScriptExecutor)_webdriver).ExecuteScript(js, hiddentElement);
  8. hiddentElement = newhouse.FindElement(By.CssSelector("div[class='ms-crm-Inline-Validation']"));
  9. if (hiddentElement .Text.Contains(Comment)
  10. {
  11. //log
  12. }
  13. else
  14. {
  15. //assertion
  16. }
  17. }
Add Comment
Please, Sign In to add comment