0

Today is my 2nd day playing with selenium. Out of curiosity, is there a site with selenium commands and their equivalent javascript/java method?

I'm trying to create a jmeter test where it takes a Webdriver sampler and executes it. I got some commands from this site. About halfway down, they showed how selenium captured data can be converted to WebDriver format (screenshot below) sample cmds)

This is a screenshot of my working "script" from selenium.

our selenium cmds

I had tried the sample commands/scripts from this website here and they worked. However, I couldn't get my cmds from my script working because I couldn't figure out the equivalent js/java method to use. For example, I have a "waitforElementPresent" command in my "script". However, I couldn't find a waitforElementPresent or a addSelection method in the api (link found here).

Is there a site out there that shows us which methods to use for which selenium command? Am I crazy and shouldn't be doing exploratory exercises like this? Thanks in advance for your help.

2 Answers 2

1

There is even easier way:

  1. Open your recorded testcase in Selenium IDE'
  2. Click File - Export TestCase As...
  3. Select desired language in which you want to learn (my assumption is Java - JUnit 4 - Webdriver)
  4. Open the file in your peferred IDE or text editor
  5. You will see all steps transferred into code, with it correct equivalents
Sign up to request clarification or add additional context in comments.

Comments

1

on http://www.seleniumhq.org/docs/ you can find a lot of information on the java commands/methods of selenium.

If you want to learn more about webDriver I would recommend to read the following documents http://www.seleniumhq.org/docs/03_webdriver.jsp

Just start at the beginning and practice with small pieces of code.

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.