[GH-ISSUE #989] Selenium tests are broken after bootstrap upgrade #531

Closed
opened 2026-02-25 21:35:17 +03:00 by kerem · 4 comments
Owner

Originally created by @kroky on GitHub (Apr 30, 2024).
Original GitHub issue: https://github.com/cypht-org/cypht/issues/989

Originally assigned to: @Shadow243 on GitHub.

🐛 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
Originally created by @kroky on GitHub (Apr 30, 2024). Original GitHub issue: https://github.com/cypht-org/cypht/issues/989 Originally assigned to: @Shadow243 on GitHub. ## 🐛 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`
kerem closed this issue 2026-02-25 21:35:17 +03:00
Author
Owner

@Shadow243 commented on GitHub (May 1, 2024):

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.

<!-- gh-comment-id:2089287656 --> @Shadow243 commented on GitHub (May 1, 2024): 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.
Author
Owner

@Shadow243 commented on GitHub (May 1, 2024):

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
<!-- gh-comment-id:2089294612 --> @Shadow243 commented on GitHub (May 1, 2024): > 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: <img width="1031" alt="Screenshot 2024-05-02 at 02 38 56" src="https://github.com/cypht-org/cypht/assets/28566468/40e6c4d3-1bfd-4dfe-9ab6-45b98862e555">
Author
Owner

@kroky commented on GitHub (May 2, 2024):

Sure, upgrade what is needed!

<!-- gh-comment-id:2089815348 --> @kroky commented on GitHub (May 2, 2024): Sure, upgrade what is needed!
Author
Owner

@Shadow243 commented on GitHub (May 6, 2024):

Sure, upgrade what is needed!

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

<!-- gh-comment-id:2096505853 --> @Shadow243 commented on GitHub (May 6, 2024): > Sure, upgrade what is needed! @kroky the MR is ready here https://github.com/cypht-org/cypht/pull/998
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
starred/cypht#531
No description provided.