1

I was looking to navigate to the "chrome:settings" using selenium. But when I try using driver.get("chrome://settings") it stops at the "about:blank". Also when I try using "http://chrome://settings" it goes to "chrome//settings".

Please help me.

Ardesco
  • 7,281
  • 26
  • 49
codeomnitrix
  • 4,179
  • 19
  • 66
  • 102

1 Answers1

1

You can't access this page through Selenium.

Selenium is designed to automate web pages, not the settings mechanism of the browser.

Whatever you want to do in the settings page you should be doing using DesiredCapabilities, have a look at the chromedriver wiki for more information:

https://code.google.com/p/chromedriver/wiki/CapabilitiesAndSwitches

It would be helpful if you told us what you were trying to do inside the settings tab, we may be able to provide a more useful suggestion.

Ardesco
  • 7,281
  • 26
  • 49
  • Thanks Ardesco for response. Actually I need to have a screenshot of the dropped cookies which appear under content settings. So could you please provide me a turn around to take that screenshot. – codeomnitrix May 06 '13 at 05:19
  • You can't in Selenium. With Selenium screenshots are not taken the way you think they are, it is not a capture of what is currently on screen. It actually takes a snapshot by copying what the browser has currently rendered as a screenshot. This explanation from PhantomJS (Which is the principle that Selenium uses) is clearer than me: https://github.com/ariya/phantomjs/wiki/Screen-Capture. As the settings page is not a web page being rendered it will not be captured in a screenshot, none of the browser chrome is. – Ardesco May 06 '13 at 08:03
  • If you want to track cookies the best thing to do is use driver.manage().getCookies() to get a list of visible cookies before and then after. Bear in mind that HTTPOnly cookies will not be visible to Selenium though. – Ardesco May 06 '13 at 08:11