Quantcast
Channel: Active questions tagged python - Stack Overflow
Viewing all articles
Browse latest Browse all 16773

Selenium syntax difference on different resources - Why is this

$
0
0

I have been working with selenium and consulting different helping resources for error solving. I have seen that sometimes, there is a slight difference in the syntax of the locators used.

This is what I am currently using.

driver.find_element(By.ID, "id")

But I have also seen this being used sometimes:

driver.find_element_by_id("id")

Can you please explain the difference.

I am using the following syntax but curios why is there a different syntax as well.

driver.find_element(By.ID, "id")

Viewing all articles
Browse latest Browse all 16773

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>