예제 #1
0
 def find(self):
     # return self._collection.get_actual_webelements()[self._index]
     return wait_for(
         self._collection,
         have.size_at_least(self._index + 1),
         config.timeout,
         config.poll_during_waits)[self._index]
예제 #2
0
 def __len__(self):
     # todo: optimise to the following:
     #   return self.waifFor(size_at_least(0)),
     # where waitFor will return the result of condition application, not self like should
     return len(
         _wait_with_screenshot(self._webdriver, self,
                               have.size_at_least(0)))
예제 #3
0
 def find(self):
     # webelements = self._collection()
     webelements = wait_for(self._collection,
                            have.size_at_least(self._slice.stop),
                            config.timeout,
                            config.poll_during_waits)
     return webelements[self._slice.start:self._slice.stop:self._slice.step]
예제 #4
0
def test_condition_have_size():
    assert have.size(9).expected == 9
    assert have.size_at_least(8).expected == 8
예제 #5
0
 def get_brand_text_list():
     return [
         el.text
         for el in ss('tbody .name > strong').should(have.size_at_least(1))
     ]
def get_search_results():
    return [el for el in s('.search-results.modal').should(visible).ss('div .title').should(have.size_at_least(1))]
예제 #7
0
 def status_list():
     return [
         el.text
         for el in ss('tbody .order-status').should(have.size_at_least(1))
     ]
예제 #8
0
 def office_list():
     return [
         el.text
         for el in ss('tbody .order-office').should(have.size_at_least(1))
     ]
예제 #9
0
 def order_num_list():
     return [
         el.text for el in ss('tbody p strong:not([class]').should(
             have.size_at_least(1))
     ]
예제 #10
0
 def get_rows_order_part():
     return ss(by.xpath('//tr [@class=" "]')).should_be(
         have.size_at_least(1))
예제 #11
0
 def test_user_can_search(self):
     (BasePage.at(SearchPage()).open().search(
         "Autoline").get_search_results().should(have.size_at_least(1)))