Verify the connection of a selenium

0

I have an application in selenium of c # but during the execution it can happen that it is without internet connection. so I did it this way:

try{
    driver2.Navigate().Refresh();
}catch(Exception ex){
    Console.WriteLine(ex.Message);
}

Perole removes the internet physically from the team, the page refreshes, appears timeOut and goes through the try but does not throw any exception. How do I capture that error that there is no connection to the page?

    
asked by lARAPRO 23.10.2018 в 22:51
source

0 answers