Running Cucumber tests directly from executable jar

I would divide the problem you are thinking of in two parts. Create an executable jar Run Cucumber from your own main method Creating an executable jar using Maven can be done in different ways. One way of doing it is described here: http://www.thinkcode.se/blog/2011/03/05/create-an-executable-jar-from-maven It is a small example that only focuses on executing something … Read more

Net::ReadTimeout (Net::ReadTimeout) Selenium Ruby

Another option to use RSpec::Retry which adds a retry option for intermittently failing specs. require ‘rspec/retry’ RSpec.configure do |config| # show retry status in spec process config.verbose_retry = true # Try twice (retry once) config.default_retry_count = 2 # Only retry when Selenium raises Net::ReadTimeout config.exceptions_to_retry = [Net::ReadTimeout] end

Chrome 62 and Flash

To enable Flash before each test and WhiteList the url you can use the following code block to configure the WebDriver instance to allow Flash: ChromeOptions options = new ChromeOptions(); Map<String, Object> prefs = new HashMap<String, Object>(); prefs.put(“profile.default_content_setting_values.plugins”, 1); prefs.put(“profile.content_settings.plugin_whitelist.adobe-flash-player”, 1); prefs.put(“profile.content_settings.exceptions.plugins.*,*.per_resource.adobe-flash-player”, 1); prefs.put(“PluginsAllowedForUrls”, “https://your_url.com”); options.setExperimentalOption(“prefs”, prefs); WebDriver driver = new ChromeDriver(options); Here you can … Read more

cucumber throwing java.lang.NoClassDefFoundError: io/cucumber/core/gherkin/FeatureParser

I’m learning Cucumber and I’m getting the FeatureParser error If you follow the 10 minute tutorial you’ll get an introduction that uses Maven dependency management. In addition to this tutorial I would strongly urge you to invest time in learning either Maven or Gradle along with Cucumber. Amongst other things these tools will automate your … Read more