I tried with find_element_by() and I noticed that 3.5 Selenium version changed to find_element syntax but there are two ways: find_element(By.ID, "id-name") and find_element("id", "id-name") which one is the correct way? It worked the 2nd way but first one didn't. What do I have to consider to use one?
Both are correct
By.ID is literally an attribute with a string value of 'id'
BY.ID is better to use just in case they change this in the future, so you do not have to update your code.
Selenium on find_element