Karish
Karish

Reputation: 61

Do we have interactive mode in selenium webdriver?

I am a newbie to Selenium.I want to know do we have any interactive mode to automate Selenium webdriver.Because i want to test each and every line is correct or not while automating.I have Automated Watir earlier,i have used "irb" to interact with.Please help me do we have any similar kind of mode in Selenium webdriver.

Upvotes: 1

Views: 4323

Answers (3)

luiscabus
luiscabus

Reputation: 309

I'm sorry if this topic may feel so old, but I have an idea for this.

You can use the python interpreter in the terminal and type each line:

from selenium import webdriver
b = webdriver.Firefox()
b.get('https://www.google.com')

And so on :)

Upvotes: 1

Jason McI
Jason McI

Reputation: 115

I use a debugger (byebug gem) to stop tests at the point where I need to continue the automation interactively. I prefer to have all gems, modules, and classes available when I hit the breakpoint.

I also wrote a couple methods that will reload page object classes from the commandline/breakpoint. I can add a new method, reload, and verify it works, and move on to the next action; all without restarting the test.

Upvotes: 0

Stefan
Stefan

Reputation: 135

IRB is nothing Watir specific it is just an interactive ruby shell (IRB = Interactive Ruby Shell) and thus you can also use it to work with Selenium. You only need the selenium-webdriver gem and then you can start.

You can also find a good getting started tutorial here: http://aspyct.org/blog/2012/09/09/functional-web-testing-with-selenium-and-ruby/

Upvotes: 2

Related Questions