none
Selenium WebDriver Exception - Element timed out(Session gets expired and Remote Web driver gets killed)

    Question

  • We are using Selenium with C#. We are facing issue of driver getting killed when we try and verify that certain object is not present, below is the code

    public class GraphNew
    {
        public Boolean testGraphNew(IWebDriver driver, Logger OneLogger)
        {
            try
            { //Navigate to a page
                try
                {
                    driver.FindElement(By.XPath("//a[contains(text(),'Add New Claim')]")).Click();
                }
                catch
                {
                    OneLogger.Log("Element is not prsent")
                }
            }
        }
        catch(Exception e)
        {
            OneLogger.LogException(e);
            return false;
        }
    }

    Friday, February 19, 2016 1:34 PM

Answers

All replies