Total Pageviews

Monday, 25 November 2019

Empty serenity report generated issue

Sometimes we face issue in serenity bdd like all the tests are run but there is empty serenity report generated.
like below:

Although there can be multiple of reasons but for me it was because of tags in runner file.

I was giving multiple comma seperated tags like below..

which was causing problem since cucumber stopped this way in its latest release.

So when I gave just one tag , report generated fine..


Tuesday, 15 October 2019

HackerRank:30 Days of Code

Day 8: Dictionaries and Maps



Day 9: Recursion 3



Day 10: Binary Numbers




Day 17: More Exceptions



Day 18: Queues and Stacks

Day 19: Interfaces


Day 20: Sorting


Day 21: Generics


Day 22: Binary Search Trees


Friday, 1 March 2019

Disabling images on a webpage using selenium

             
              System.setProperty("webdriver.chrome.driver","./drivers/chromedriver.exe");
Map<String, Object> prefs = new HashMap<String, Object>();
prefs.put("profile.default_content_setting_values.images",2);
ChromeOptions options = new ChromeOptions();
options.setExperimentalOption("prefs", prefs);
WebDriver driver = new ChromeDriver(options);
driver.get("https://www.google.com/");


// we can use different preferences to set browsers  as per our need.
profile.default_content_setting_values.cookies
profile.default_content_setting_values.images
profile.default_content_setting_values.javascript
profile.default_content_setting_values.plugins
profile.default_content_setting_values.popups
profile.default_content_setting_values.geolocation
profile.default_content_setting_values.notifications
profile.default_content_setting_values.auto_select_certificate
profile.default_content_setting_values.fullscreen
profile.default_content_setting_values.mouselock
profile.default_content_setting_values.mixed_script
profile.default_content_setting_values.media_stream
profile.default_content_setting_values.media_stream_mic
profile.default_content_setting_values.media_stream_camera
profile.default_content_setting_values.protocol_handlers
profile.default_content_setting_values.ppapi_broker
profile.default_content_setting_values.automatic_downloads
profile.default_content_setting_values.midi_sysex
profile.default_content_setting_values.push_messaging
profile.default_content_setting_values.ssl_cert_decisions
profile.default_content_setting_values.app_banner
profile.default_content_setting_values.site_engagement

profile.default_content_setting_values.durable_storage

Source: https://chromium.googlesource.com/chromium/src/+/7e762c1f17514a29834506860961ba2f24e7e6e5/components/content_settings/core/common/pref_names.cc