﻿from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By

class BasePage():
	def __init__(self, browser, url, timeout=10):
		self.browser = browser
		self.url = url
	def open(self):
		self.browser.get(self.url)
	def is_element_present(self, find_element_by_css_selector, login_link):
		try:
			self.browser.find_element(find_element_by_css_selector, login_link)
		except (NoSuchElementException):
			return False
		return True

5feedac47e860ff12f5686c721fb24b8cee14ee6
﻿from selenium.common.exceptions import NoSuchElementException
from selenium.webdriver.common.by import By

class BasePage():
	def __init__(self, browser, url, timeout=10):
		self.browser = browser
		self.url = url
	def open(self):
		self.browser.get(self.url)
	def is_element_present(self, find_element_by_css_selector, login_link):
		try:
			self.browser.find_element(find_element_by_css_selector, login_link)
		except (NoSuchElementException):
			return False
		return True
