cypht
cypht copied to clipboard
Selenium tests are broken after bootstrap upgrade
🐛 Bugreport
I have fixed the broken part coming from .env changes but still a lot of tests fail due to missing class name or changes html structure.
@alvinBM @Shadow243 please check these tests and fix them by targeting new css classes or just adding what is missing in the actual cypht code. I think some tests are actually showing bugs in Cypht rather than bugs in the tests themselves.
Version & Environment
master and 2.0.x branch
Steps to reproduce
- cd tests/selenium
- sh runall.sh
- (you can also run individual ones by executing
python3 login.py
It seems that there is deprecation of certain attributes like:
driver.find_element_by_id("some_id")
driver.find_element_by_name("some_name")
driver.find_element_by_tag_name("some_tag")
driver.find_element_by_css_selector("some_selector")
driver.find_element_by_class_name("some_class")
driver.find_element_by_link_text("some_text")
driver.find_element_by_partial_link_text("some_other_text")
driver.find_element_by_xpath("some_xpath")
https://aleshativadar.medium.com/attributeerror-webdriver-object-has-no-attribute-find-element-by-name-e7cf3b271227#:~:text=To%20sum%20up%2C%20%E2%80%9CAttributeError%3A,and%20removed%20starting%20Selenium%204.3.
I'l try to update using find_element.
It seems that there is deprecation of certain attributes like:
driver.find_element_by_id("some_id") driver.find_element_by_name("some_name") driver.find_element_by_tag_name("some_tag") driver.find_element_by_css_selector("some_selector") driver.find_element_by_class_name("some_class") driver.find_element_by_link_text("some_text") driver.find_element_by_partial_link_text("some_other_text") driver.find_element_by_xpath("some_xpath")
https://aleshativadar.medium.com/attributeerror-webdriver-object-has-no-attribute-find-element-by-name-e7cf3b271227#:~:text=To%20sum%20up%2C%20%E2%80%9CAttributeError%3A,and%20removed%20starting%20Selenium%204.3.
I'l try to update using find_element. I have some positive result after update:
Sure, upgrade what is needed!
Sure, upgrade what is needed!
@kroky the MR is ready here https://github.com/cypht-org/cypht/pull/998