1

I am using find_element while I have seen findElement being used at some places in selenium. I am using an older version of chromedriver.

Are the two same or is there a difference?

I am writing codes for someone and I am just wondering if the codes would work for them if there is a difference in the version.

Here's my code:

    from selenium import webdriver
    driver = webdriver.Chrome('C:\Users\Nishima.Suman\Downloads\chromedriver_win32 (3)\chromedriver.exe')
    driver.get('https://en.wikipedia.org/wiki/Dixons_Retail')
    x= driver.find_element_by_xpath('//*[@id="mw-content-text"]/div/table/caption')
    print x.text
2
  • 5
    The syntax changes depending on the language. python/ruby: .find_element, Java/javascript: .findElement, CSharp: .FindElement. Commented Jul 27, 2017 at 16:03
  • Thanx!! That helped.:) Commented Jul 28, 2017 at 7:37

2 Answers 2

1

They both are actually same. There's no difference in functionality of findElement and find_element. It just depends on which programming language you using to write your script.

JAVA: findElement

Python: find_element

Make sure there's no mistake in uppercase and lowercase.

Sign up to request clarification or add additional context in comments.

1 Comment

Thanx!:) That helped.
1

There is no difference between them except one that findElement() is part of java-client and find_element is part of python, if we talk about functionality both are same.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.