// Click on add travelers info some time it gets link or some itime it gets field to add travelers public void ClickonTravelersInfo() { // Added both condition in if else try { if (WebElementHelper.IsElementDisplayed(TravelersLink)) { ClickButton(TravelersLink); } else { ClickButton(TravelersLink); } } catch (Exception) { ClickButton(Travelersbtn); } }