Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+1 vote
3 views
in DevOps and Agile by (19.7k points)

I'm having a hard (but very interesting time) diving into Behavior Driven Development using Cucumber, RSpec, Selenium, and Rails.

I have my setup ready for testing with Selenium, and it's funny to watch Firefox pop up and run automatically through my scenarios. But one thing I'd like to do is pause or stop execution at a certain point, so I can inspect what Selenium sees at a certain point.

I know of the save_and_open_page command, but this only shows me plain HTML without formatting. So maybe there is a stop_execution method or something that stops Selenium without closing the browser?

1 Answer

0 votes
by (62.9k points)

Install pry, then place binding.pry in your test wherever you would like it to pause.

When you're done, press Ctrl+D or type exit in the REPL that gets opened to continue execution.

If you are interested to learn Selenium on a much deeper level and want to become a professional in the testing domain, check out Intellipaat’s online Selenium certification!

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...