cypht icon indicating copy to clipboard operation
cypht copied to clipboard

Selenium tests are broken after bootstrap upgrade

Open kroky opened this issue 9 months ago • 4 comments

🐛 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

  1. cd tests/selenium
  2. sh runall.sh
  3. (you can also run individual ones by executing python3 login.py

kroky avatar Apr 30 '24 21:04 kroky

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.

Shadow243 avatar May 01 '24 23:05 Shadow243

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:

Screenshot 2024-05-02 at 02 38 56

Shadow243 avatar May 01 '24 23:05 Shadow243

Sure, upgrade what is needed!

kroky avatar May 02 '24 07:05 kroky

Sure, upgrade what is needed!

@kroky the MR is ready here https://github.com/cypht-org/cypht/pull/998

Shadow243 avatar May 06 '24 17:05 Shadow243