Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Selenium tests are broken after bootstrap upgrade #989

Open
kroky opened this issue Apr 30, 2024 · 4 comments
Open

Selenium tests are broken after bootstrap upgrade #989

kroky opened this issue Apr 30, 2024 · 4 comments
Assignees

Comments

@kroky
Copy link
Member

kroky commented Apr 30, 2024

馃悰 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
@Shadow243
Copy link
Member

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
Copy link
Member

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

@kroky
Copy link
Member Author

kroky commented May 2, 2024

Sure, upgrade what is needed!

@Shadow243
Copy link
Member

Sure, upgrade what is needed!

@kroky the MR is ready here #998

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants