selene icon indicating copy to clipboard operation
selene copied to clipboard

"and_" condition returns attribute error

Open SanKolts opened this issue 3 years ago • 1 comments

code:

more_menu.menu_elements.should(have.css_class('dropdown-list-item-disabled').and_(have.attribute('aria-disabled').value('true')))

raises an error:

Reason: AttributeError: 'list' object has no attribute 'get_attribute'

SanKolts avatar Sep 08 '22 14:09 SanKolts

reproduced something similar with "or_"...

cells = browser.all('selector')
cells.should(
   have.text(f"{text_1} {text_2}")
   .or_(have.text(f"{text_2} {text_1}"))
   .or_(have.text(f"{text_2} {text_1}".upper()))
)

image

reported by ru selene user at https://t.me/selene_py_ru/7106

yashaka avatar Dec 05 '22 15:12 yashaka