using OpenQA.Selenium; using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace BankingBot.Extensions { public static class IWebElementExtensions { public static bool HasElement(this IWebElement element, By by) { try { element.FindElement(by); return true; } catch (NoSuchElementException) { return false; } } } }