This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from selenium import webdriver | |
| a = webdriver.Firefox() | |
| a.get("http://magento-demo.lexiconn.com/") | |
| a.maximize_window() | |
| a.find_element_by_xpath("//input[@id='search']").send_keys("Bed & Bath") | |
| a.find_element_by_xpath("//button[@title='Search']").click() | |
| lis = a.find_elements_by_xpath("//h2[@class='product-name'] / a ") |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| from selenium import webdriver | |
| class SearchTests (unittest.TestCase): | |
| def setUp(self): | |
| self.a = webdriver.Firefox() | |
| self.a.get("http://magento-demo.lexiconn.com/") | |
| self.a.maximize_window() | |
| def test_search(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| from selenium import webdriver | |
| class SearchTests (unittest.TestCase): | |
| def setUp(self): | |
| self.a = webdriver.Firefox() | |
| self.a.get("http://magento-demo.lexiconn.com/") | |
| self.a.maximize_window() | |
| def test_search_product1(self): |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| from search_tests import SearchTests | |
| from homepage_tests import HomePageTest | |
| x = unittest.TestLoader().loadTestsFromTestCase(SearchTests) | |
| y = unittest.TestLoader().loadTestsFromTestCase(HomePageTest) | |
| z = unittest.TestSuite([x, y]) | |
| unittest.TextTestRunner(verbosity=2).run(z) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| import HTMLTestRunner | |
| import os | |
| from search_tests import SearchTests | |
| from homepage_tests import HomePageTest | |
| dir = os.getcwd() | |
| x = unittest.TestLoader().loadTestsFromTestCase(SearchTests) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| from selenium import webdriver | |
| from time import gmtime,strftime | |
| class Login (unittest.TestCase): | |
| @classmethod | |
| def setUpClass(cls): | |
| cls.a = webdriver.Firefox() | |
| cls.a.implicitly_wait(30) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| from selenium import webdriver | |
| from selenium.webdriver.support.ui import Select | |
| class dropdown (unittest.TestCase): | |
| @classmethod | |
| def setUpClass(cls): | |
| cls.a = webdriver.Firefox() | |
| cls.a.implicitly_wait(30) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| from selenium import webdriver | |
| class compare (unittest.TestCase): | |
| def setUp(self): | |
| self.a = webdriver.Firefox() | |
| self.a.implicitly_wait(30) | |
| self.a.get("http://magento-demo.lexiconn.com/") | |
| self.a.maximize_window() |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import unittest | |
| from selenium import webdriver | |
| class search (unittest.TestCase): | |
| def setUp(self): | |
| self.a = webdriver.Firefox() | |
| self.a.implicitly_wait(30) | |
| self.a.get("http://magento-demo.lexiconn.com/") | |
| self.a.maximize_window() |
OlderNewer