Ejemplo n.º 1
0
 def test_har_retrieval(self):
     self.client.blacklist("http://www\\.facebook\\.com/.*", 306)
     self.client.blacklist("http://static\\.ak\\.fbcdn\\.com/.*", 306)
     self.client.new_har("shirts")
     s = ShirtPage(self.driver)
     s.open()
     h = self.client.har
     har = Har(h)
     four_oh_fours = [e for e in har.entries if e.response.status == 404]
     assert(len(four_oh_fours) == 1)
Ejemplo n.º 2
0
 def test_collar_style(self):
     s = ShirtPage(self.driver)
     s.open()
     # nothing in there at first
     assert s.top_search_text == ''
     s.top_search_text = "buckets"
     r = s.push_the_search_button()
     assert s.top_search_text == 'buckets'
     assert type(s.top_search_text) == types.StringType
     assert s.top_search_unicode == 'buckets'
     assert type(s.top_search_unicode) == types.UnicodeType
Ejemplo n.º 3
0
 def test_blacklist(self):
     self.client.blacklist("http://www\\.ebay\\.com/.*", 306)
     self.client.blacklist("http://www\\.facebook\\.com/.*", 306)
     s = ShirtPage(self.driver)
     s.open()
     s.change_collar_style("Banded (Collarless)")
     assert(s.is_collar_selected("Banded (Collarless)"))
Ejemplo n.º 4
0
    def test_meta(self):
        s = ShirtPage()
        s.go_to_mens_dress_shirts()
        metas = s.get_meta_elements()
        assert(len(metas) == 2)
        
        keywords = s.get_meta_element("keywords")
        assert(keywords.get_attribute("Content") == "Dress Shirts")

        description = s.get_meta_element("description")
        assert(description.get_attribute("Content") == "Shop eBay Fashion for the most dynamic selection of affordable, new  Dress Shirts Items. Find the best deals on new and used fashion.  Learn more about eBay Buyer Protection.")
Ejemplo n.º 5
0
 def test_collar_style(self):
     s = ShirtPage(self.driver)
     s.open()
     # nothing in there at first
     assert s.top_search_text == ''
     s.top_search_text = "buckets"
     r = s.push_the_search_button()
     assert s.top_search_text == 'buckets'
     assert type(s.top_search_text) == types.StringType
     assert s.top_search_unicode == 'buckets'
     assert type(s.top_search_unicode) == types.UnicodeType
Ejemplo n.º 6
0
 def test_collar_style(self):
     s = ShirtPage()
     s.go_to_mens_dress_shirts()
     s.change_collar_style("Banded (Collarless)")
     assert(s.is_collar_selected("Banded (Collarless)"))
Ejemplo n.º 7
0
 def test_har_retrieval(self):
     s = ShirtPage(self.driver)
     s.open()
     assert(s.result_count_class == 'rsltCnt')
Ejemplo n.º 8
0
 def test_har_retrieval(self):
     s = ShirtPage(self.driver)
     s.open()
     table = self.driver.find_element_by_locator("id=v4-p225")
     row = table.find_element_by_locator("css=tr")
     assert(isinstance(row, saunter.web_element.WebElement))
 def test_single_set_by_text(self):
     s = ShirtPage(self.driver)
     s.open()
     s.current_search_category.selected = "text=Art"
     assert(s.current_search_category.selected == "Art")
 def test_single_set_by_index(self):
     s = ShirtPage(self.driver)
     s.open()
     s.current_search_category.selected = "index=2" # indexed from 1
     assert(s.current_search_category.selected == "Art")
 def test_single_set_by_value(self):
     s = ShirtPage(self.driver)
     s.open()
     s.current_search_category.selected = "value=550"
     print(s.current_search_category.options)
     assert(s.current_search_category.selected == "Art")
 def test_single_get(self):
     s = ShirtPage(self.driver)
     s.open()
     assert(s.current_search_category.selected == "Clothing, Shoes & Accessories")