public string GetLoggedUserName() { WaitersWrapper.WaitElementInteractable(_webDriver, _accountInfoButton, 10); _webDriver.FindElement(_accountInfoButton).Click(); WaitersWrapper.WaitElementVisiable(_webDriver, _loggedUserName, 10); return(_webDriver.FindElement(_loggedUserName).Text); }
public string GetPrice() { try { WaitersWrapper.WaitElementInteractable(_frame); IWebElement frame = _webDriver.FindElement(_frame); _webDriver.SwitchTo().Frame(frame); } catch { LoggerWrapper.LogError("Frame wasn't found or XPath (or CSSSelector) is incorrect."); throw; } try { WaitersWrapper.WaitElementVisiable(_totalEstimatedCostLabel); string totalEstimatedCostLabel = _webDriver.FindElement(_totalEstimatedCostLabel).Text; var labelParts = totalEstimatedCostLabel.Split(' '); LoggerWrapper.LogInfo("Pricing label was successfully parsed!"); return(labelParts[4]); } catch { LoggerWrapper.LogError("Pricing label wasn't parse."); throw; } }
public string UnsuccessfullLogin(string login) { WaitersWrapper.WaitElementInteractable(_webDriver, _loginInputButton, 10); _webDriver.FindElement(_loginInputButton).SendKeys(login); _webDriver.FindElement(_enterButton).Click(); WaitersWrapper.WaitElementVisiable(_webDriver, _incorrectLoginMessage, 10); return(_webDriver.FindElement(_incorrectLoginMessage).Text); }
public string GetPrice() { try { WaitersWrapper.WaitElementVisiable(_totalEstimatedCostLabel); string totalEstimatedCostLabel = _webDriver.FindElement(_totalEstimatedCostLabel).Text; var labelParts = totalEstimatedCostLabel.Split(' '); LoggerWrapper.LogInfo("Pricing label was successfully parsed!"); return(labelParts[4]); } catch { LoggerWrapper.LogError("Pricing label wasn't parsed."); throw; } }
public void WaitUntilMessageRecieved() { WaitersWrapper.WaitElementVisiable(_webDriver, _amountOfIncomingMessages, 10); }
public string GetSenderName() { WaitersWrapper.WaitElementVisiable(_webDriver, _senderNameButton, 10); return(_webDriver.FindElement(_senderNameButton).GetAttribute("title")); }
public string GetMessageText() { WaitersWrapper.WaitElementVisiable(_webDriver, _messageText, 10); return(_webDriver.FindElement(_messageText).Text); }
public GoogleAccountPersonalInfoPageObject GoToPersonalInfo() { WaitersWrapper.WaitElementVisiable(_webDriver, _personalInfoButton, 10); _webDriver.FindElement(_personalInfoButton).Click(); return(new GoogleAccountPersonalInfoPageObject(_webDriver)); }
public string GetMessageState() { WaitersWrapper.WaitElementVisiable(_webDriver, _latestMessageState, 10); return(_webDriver.FindElement(_latestMessageState).GetAttribute("title")); }