How to Suppress selenium WebDriver logs from being printed on the screen

3,769 views
Skip to first unread message

Shoaib

unread,
Nov 16, 2012, 1:33:14 AM11/16/12
to seleniu...@googlegroups.com
Hi all i am new to selenium web driver i have just shifted from selenium rc to selenium backed  webdriver so as to overcome the inter browser compatibility that issue has been resolved but when i run my test case i have some unwanted log messages being printed on to my consoled can anyone tell me how to get rid of them.

here it is my code.

import com.thoughtworks.selenium.*;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
import org.openqa.selenium.WebDriver;
import org.openqa.selenium.WebDriverBackedSelenium;
import org.openqa.selenium.chrome.ChromeDriver;
import org.openqa.selenium.chrome.ChromeOptions;
import org.openqa.selenium.firefox.FirefoxDriver;
import org.openqa.selenium.firefox.FirefoxProfile;
import org.openqa.selenium.remote.DesiredCapabilities;

import java.io.FileInputStream;
import java.io.FileOutputStream;
import java.util.Arrays;
import java.util.Properties;
import java.util.regex.Pattern;

public class SalesforceHome extends SeleneseTestBase{
@Before
public void setUp() throws Exception {
ChromeOptions options = new ChromeOptions();
        options.addArguments("--disable-logging");


DesiredCapabilities capabilities = DesiredCapabilities.chrome();

       capabilities.setCapability(ChromeOptions.CAPABILITY, options);
//WebDriver driver =  new ChromeDriver();
//  FirefoxProfile profile = new FirefoxProfile();
//        profile.setPreference("network.proxy.type", 1);
//        profile.setPreference("network.proxy.http","192.168.8.203");
//        profile.setPreference("network.proxy.http_port", 3128); 
//        profile.setPreference("network.proxy.ssl", "192.168.8.203");
//        profile.setPreference("network.proxy.ssl_port",3128);
//        profile.setPreference("network.proxy.ftp", "192.168.8.203");
//        profile.setPreference("network.proxy.ftp_port",3128);
//        WebDriver driver = new FirefoxDriver(profile);
 Properties prop = new Properties();
//  prop.setProperty("useragentname", "chrome");
//    prop.store(new FileOutputStream("config.properties"), null);
 prop.load(new FileInputStream("config.properties"));
 String BName=prop.getProperty("useragentname");
 Configuration conf=new Configuration();
 WebDriver driver = conf.setConf(BName);
 String baseUrl = "https://login.salesforce.com/";
 selenium = new WebDriverBackedSelenium(driver, baseUrl);
}

@Test
public void testSalesforceHome() throws Exception 
{
selenium.setTimeout("10000000");
selenium.open("/");
// while(!selenium.isElementPresent("username"))
// {
// Thread.sleep(10);
// }
selenium.type("id=username", "shoaib....@gmail.com");
   
selenium.type("id=password", "goodboy");
selenium.click("id=Login");
selenium.waitForPageToLoad("15000000");
// while(!selenium.isElementPresent("link=Home"))
// {
// Thread.sleep(10);
// }
selenium.click("link=Home");
selenium.waitForPageToLoad("15000000");
selenium.type("id=phSearchInput", "Shoa");
selenium.waitForPageToLoad("50000");
// while(!selenium.isElementPresent("id=phSearchButton"))
// {
// Thread.sleep(10);
// }
selenium.click("id=phSearchButton");
selenium.waitForPageToLoad("15000000");
}

@After
public void tearDown() throws Exception {
selenium.stop();
}
}




and the unwanted logs i get are 

logs=/madmin/selenium_testbed/testcases/runner/chromedriver.log
Get connection: HttpRoute[{}->http://localhost:9722], timeout = 120000
[HttpRoute[{}->http://localhost:9722]] total kept alive: 0, total issued: 0, total allocated: 0 out of 2000
No free connections [HttpRoute[{}->http://localhost:9722]][null]
Available capacity: 2000 out of 2000 [HttpRoute[{}->http://localhost:9722]][null]
Creating new connection [HttpRoute[{}->http://localhost:9722]]
Connecting to localhost:9722
CookieSpec selected: best-match
Auth cache not set in the context
Attempt 1 to execute request
Sending request: POST /session HTTP/1.1
>> "POST /session HTTP/1.1[\r][\n]"
>> "Accept: application/json, image/png[\r][\n]"
>> "Content-Type: application/json; charset=utf-8[\r][\n]"
>> "Content-Length: 229[\r][\n]"
>> "Host: localhost:9722[\r][\n]"
>> "Connection: Keep-Alive[\r][\n]"
>> "[\r][\n]"
>> POST /session HTTP/1.1
>> Accept: application/json, image/png
>> Content-Type: application/json; charset=utf-8
>> Content-Length: 229
>> Host: localhost:9722
>> Connection: Keep-Alive
>> "{"desiredCapabilities":{"loggingPrefs":{"driver":"OFF"},"platform":"ANY","browserName":"chrome","chromeOptions":{"args":["--disable-logging"],"extensions":[]},"version":"","chrome.switches":["--proxy-server=192.168.8.203:3128"]}}"

(google-chrome:2547): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(google-chrome:2547): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(google-chrome:2547): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",

(google-chrome:2547): Gtk-WARNING **: Unable to locate theme engine in module_path: "pixmap",
failed to create drawable
<< "HTTP/1.1 303 See Other[\r][\n]"
<< "connection:close[\r][\n]"
<< "content-type:application/json; charset=utf-8[\r][\n]"
<< "location:/session/700f0bf0f0f6991ce970b1d87012345c[\r][\n]"
<< "content-length:66[\r][\n]"
<< "[\r][\n]"
Receiving response: HTTP/1.1 303 See Other
<< HTTP/1.1 303 See Other
<< connection:close
<< content-type:application/json; charset=utf-8
<< location:/session/700f0bf0f0f6991ce970b1d87012345c
<< content-length:66
Redirect requested to location '/session/700f0bf0f0f6991ce970b1d87012345c'
Connection closed
Connecting to localhost:9722
CookieSpec selected: best-match
Auth cache not set in the context
Attempt 2 to execute request
Sending request: GET /session/700f0bf0f0f6991ce970b1d87012345c HTTP/1.1
>> "GET /session/700f0bf0f0f6991ce970b1d87012345c HTTP/1.1[\r][\n]"
>> "Accept: application/json, image/png[\r][\n]"
>> "Content-Type: application/json; charset=utf-8[\r][\n]"
>> "Host: localhost:9722[\r][\n]"
>> "Connection: Keep-Alive[\r][\n]"
>> "[\r][\n]"
>> GET /session/700f0bf0f0f6991ce970b1d87012345c HTTP/1.1
>> Accept: application/json, image/png
>> Content-Type: application/json; charset=utf-8
>> Host: localhost:9722
>> Connection: Keep-Alive
<< "HTTP/1.1 200 OK[\r][\n]"
<< "connection:close[\r][\n]"
<< "content-type:application/json; charset=utf-8[\r][\n]"
<< "content-length:509[\r][\n]"
<< "[\r][\n]"
Receiving response: HTTP/1.1 200 OK
<< HTTP/1.1 200 OK
<< connection:close
<< content-type:application/json; charset=utf-8
<< content-length:509
<< "{"sessionId":"700f0bf0f0f6991ce970b1d87012345c","status":0,"value":{"acceptSslCerts":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome.chromedriverVersion":"23.0.1240.0","chrome.nativeEvents":false,"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"javascriptEnabled":true,"locationContextEnabled":false,"nativeEvents":true,"platform":"linux","rotatable":false,"takesScreenshot":true,"version":"23.0.1271.64","webStorageEnabled":true}}"
Connection shut down
Released connection is not reusable.
Releasing connection [HttpRoute[{}->http://localhost:9722]][null]
Notifying no-one, there are no waiting threads
 


and many other logs kindly if any one can help me out in getting rid of this webdriver native logs.

Shoaib

unread,
Nov 17, 2012, 6:42:17 AM11/17/12
to seleniu...@googlegroups.com
can any 1 help me out or has faced the same issue before ?

Shoaib Qureshi

unread,
Nov 17, 2012, 4:42:57 PM11/17/12
to seleniu...@googlegroups.com
Hi Anurag i checked this one too but this did not help either and i tried to change this capability from multiple ways but none of 
these worked for me so far and as u gave the link it is already mentioned there that chrome.verbose is by default false so i think 
problem is does not seem there i did not post complete logs that i get on my console through out the execution of my test case these logs are 
something like that.


Get connection: HttpRoute[{}->http://localhost:21857], timeout = 120000 
[HttpRoute[{}->http://localhost:21857]] total kept alive: 0, total issued: 0, total allocated: 0 out of 2000 
No free connections [HttpRoute[{}->http://localhost:21857]][null] 
Available capacity: 2000 out of 2000 [HttpRoute[{}->http://localhost:21857]][null] 
Creating new connection [HttpRoute[{}->http://localhost:21857]] 
Connecting to localhost:21857 

CookieSpec selected: best-match 
Auth cache not set in the context 
Attempt 1 to execute request 
Sending request: POST /session HTTP/1.1 
>> "POST /session HTTP/1.1[\r][\n]" 
>> "Accept: application/json, image/png[\r][\n]" 
>> "Content-Type: application/json; charset=utf-8[\r][\n]" 
>> "Content-Length: 134[\r][\n]" 
>> "Host: localhost:21857[\r][\n]" 

>> "Connection: Keep-Alive[\r][\n]" 
>> "[\r][\n]" 
>> POST /session HTTP/1.1 
>> Accept: application/json, image/png 
>> Content-Type: application/json; charset=utf-8 
>> Content-Length: 134 
>> Host: localhost:21857 
>> Connection: Keep-Alive 
>> "{"desiredCapabilities":{"platform":"ANY","browserName":"chrome","version":"","chrome.switches":["--proxy-server=192.168.8.203:3128"]}}" 

<< "HTTP/1.1 303 See Other[\r][\n]" 
<< "connection:close[\r][\n]" 
<< "content-type:application/json; charset=utf-8[\r][\n]" 
<< "location:/session/ca11276138b32a18a58c89086c4365bf[\r][\n]" 

<< "content-length:66[\r][\n]" 
<< "[\r][\n]" 
Receiving response: HTTP/1.1 303 See Other 
<< HTTP/1.1 303 See Other 
<< connection:close 
<< content-type:application/json; charset=utf-8 
<< location:/session/ca11276138b32a18a58c89086c4365bf 
<< content-length:66 
Redirect requested to location '/session/ca11276138b32a18a58c89086c4365bf' 
Redirecting to 'http://localhost:21857/session/ca11276138b32a18a58c89086c4365bf' via HttpRoute[{}->http://localhost:21857
Connection closed 
Connecting to localhost:21857 

CookieSpec selected: best-match 
Auth cache not set in the context 
Attempt 2 to execute request 
Sending request: GET /session/ca11276138b32a18a58c89086c4365bf HTTP/1.1 
>> "GET /session/ca11276138b32a18a58c89086c4365bf HTTP/1.1[\r][\n]" 

>> "Accept: application/json, image/png[\r][\n]" 
>> "Content-Type: application/json; charset=utf-8[\r][\n]" 
>> "Host: localhost:21857[\r][\n]" 

>> "Connection: Keep-Alive[\r][\n]" 
>> "[\r][\n]" 
>> GET /session/ca11276138b32a18a58c89086c4365bf HTTP/1.1 

>> Accept: application/json, image/png 
>> Content-Type: application/json; charset=utf-8 
>> Host: localhost:21857 

>> Connection: Keep-Alive 
<< "HTTP/1.1 200 OK[\r][\n]" 
<< "connection:close[\r][\n]" 
<< "content-type:application/json; charset=utf-8[\r][\n]" 
<< "content-length:509[\r][\n]" 
<< "[\r][\n]" 
Receiving response: HTTP/1.1 200 OK 
<< HTTP/1.1 200 OK 
<< connection:close 
<< content-type:application/json; charset=utf-8 
<< content-length:509 
<< "{"sessionId":"ca11276138b32a18a58c89086c4365bf","status":0,"value":{"acceptSslCerts":false,"applicationCacheEnabled":false,"browserConnectionEnabled":false,"browserName":"chrome","chrome.chromedriverVersion":"23.0.1240.0","chrome.nativeEvents":false,"cssSelectorsEnabled":true,"databaseEnabled":false,"handlesAlerts":true,"javascriptEnabled":true,"locationContextEnabled":false,"nativeEvents":true,"platform":"linux","rotatable":false,"takesScreenshot":true,"version":"23.0.1271.64","webStorageEnabled":true}}" 

Connection shut down 
Released connection is not reusable. 
Releasing connection [HttpRoute[{}->http://localhost:21857]][null] 

Notifying no-one, there are no waiting threads 
offing log level 
Get connection: HttpRoute[{}->http://localhost:21857], timeout = 120000 
[HttpRoute[{}->http://localhost:21857]] total kept alive: 0, total issued: 0, total allocated: 0 out of 2000 
No free connections [HttpRoute[{}->http://localhost:21857]][null] 
Available capacity: 2000 out of 2000 [HttpRoute[{}->http://localhost:21857]][null] 
Creating new connection [HttpRoute[{}->http://localhost:21857]] 
Connecting to localhost:21857 

CookieSpec selected: best-match 
Auth cache not set in the context 
Attempt 1 to execute request 
Sending request: GET /session/ca11276138b32a18a58c89086c4365bf/window_handle HTTP/1.1 
>> "GET /session/ca11276138b32a18a58c89086c4365bf/window_handle HTTP/1.1[\r][\n]" 

>> "Accept: application/json, image/png[\r][\n]" 
>> "Cache-Control: no-cache[\r][\n]" 
>> "Host: localhost:21857[\r][\n]" 

>> "Connection: Keep-Alive[\r][\n]" 
>> "[\r][\n]" 
>> GET /session/ca11276138b32a18a58c89086c4365bf/window_handle HTTP/1.1 
>> Accept: application/json, image/png 
>> Cache-Control: no-cache 
>> Host: localhost:21857 

>> Connection: Keep-Alive 
<< "HTTP/1.1 200 OK[\r][\n]" 
<< "connection:close[\r][\n]" 
<< "content-type:application/json; charset=utf-8[\r][\n]" 
<< "content-length:74[\r][\n]" 

<< "[\r][\n]" 
Receiving response: HTTP/1.1 200 OK 
<< HTTP/1.1 200 OK 
<< connection:close 
<< content-type:application/json; charset=utf-8 
<< content-length:74 
<< "{"sessionId":"ca11276138b32a18a58c89086c4365bf","status":0,"value":"f1-2"}

Connection shut down 
Released connection is not reusable. 
Releasing connection [HttpRoute[{}->http://localhost:21857]][null] 

Notifying no-one, there are no waiting threads 
Get connection: HttpRoute[{}->http://localhost:21857], timeout = 120000 
[HttpRoute[{}->http://localhost:21857]] total kept alive: 0, total issued: 0, total allocated: 0 out of 2000 
No free connections [HttpRoute[{}->http://localhost:21857]][null] 
Available capacity: 2000 out of 2000 [HttpRoute[{}->http://localhost:21857]][null] 
Creating new connection [HttpRoute[{}->http://localhost:21857]] 
Connecting to localhost:21857 

CookieSpec selected: best-match 
Auth cache not set in the context 
Attempt 1 to execute request 
Sending request: POST /session/ca11276138b32a18a58c89086c4365bf/url HTTP/1.1 
>> "POST /session/ca11276138b32a18a58c89086c4365bf/url HTTP/1.1[\r][\n]" 

>> "Accept: application/json, image/png[\r][\n]" 
>> "Content-Type: application/json; charset=utf-8[\r][\n]" 
>> "Content-Length: 39[\r][\n]" 
>> "Host: localhost:21857[\r][\n]" 

>> "Connection: Keep-Alive[\r][\n]" 
>> "[\r][\n]" 
>> POST /session/ca11276138b32a18a58c89086c4365bf/url HTTP/1.1 

>> Accept: application/json, image/png 
>> Content-Type: application/json; charset=utf-8 
>> Content-Length: 39 
>> Host: localhost:21857 
>> Connection: Keep-Alive 
>> "{"url":"https://login.salesforce.com/"}" 

<< "HTTP/1.1 200 OK[\r][\n]" 
<< "connection:close[\r][\n]" 
<< "content-type:application/json; charset=utf-8[\r][\n]" 
<< "content-length:70[\r][\n]" 

<< "[\r][\n]" 
Receiving response: HTTP/1.1 200 OK 
<< HTTP/1.1 200 OK 
<< connection:close 
<< content-type:application/json; charset=utf-8 
<< content-length:70 
<< "{"sessionId":"ca11276138b32a18a58c89086c4365bf","status":0,"value":{}}" 

Connection shut down 
Released connection is not reusable. 
Releasing connection [HttpRoute[{}->http://localhost:21857]][null] 

Notifying no-one, there are no waiting threads 
Get connection: HttpRoute[{}->http://localhost:21857], timeout = 120000 
[HttpRoute[{}->http://localhost:21857]] total kept alive: 0, total issued: 0, total allocated: 0 out of 2000 
No free connections [HttpRoute[{}->http://localhost:21857]][null] 
Available capacity: 2000 out of 2000 [HttpRoute[{}->http://localhost:21857]][null] 
Creating new connection [HttpRoute[{}->http://localhost:21857]] 
Connecting to localhost:21857 

CookieSpec selected: best-match 
Auth cache not set in the context 
Attempt 1 to execute request 
Sending request: POST /session/ca11276138b32a18a58c89086c4365bf/execute HTTP/1.1 
>> "POST /session/ca11276138b32a18a58c89086c4365bf/execute HTTP/1.1[\r][\n]" 

>> "Accept: application/json, image/png[\r][\n]" 
>> "Content-Type: application/json; charset=utf-8[\r][\n]" 
>> "Content-Length: 409[\r][\n]" 
>> "Host: localhost:21857[\r][\n]" 

>> "Connection: Keep-Alive[\r][\n]" 
>> "[\r][\n]" 
>> POST /session/ca11276138b32a18a58c89086c4365bf/execute HTTP/1.1 

>> Accept: application/json, image/png 
>> Content-Type: application/json; charset=utf-8 
>> Content-Length: 409 
>> Host: localhost:21857 
>> Connection: Keep-Alive 
>> "{"args":[],"script":"if (window.__webdriverAlerts) { return; } window.__webdriverAlerts = []; window.alert = function(msg) { window.__webdriverAlerts.push(msg); }; window.__webdriverConfirms = []; window.__webdriverNextConfirm = true; window.confirm = function(msg) { window.__webdriverConfirms.push(msg); var res = window.__webdriverNextConfirm; window.__webdriverNextConfirm = true; return res; };"}" 

<< "HTTP/1.1 200 OK[\r][\n]" 
<< "connection:close[\r][\n]" 
<< "content-type:application/json; charset=utf-8[\r][\n]" 
<< "content-length:72[\r][\n]" 

<< "[\r][\n]" 
Receiving response: HTTP/1.1 200 OK 
<< HTTP/1.1 200 OK 
<< connection:close 
<< content-type:application/json; charset=utf-8 
<< content-length:72 
<< "{"sessionId":"ca11276138b32a18a58c89086c4365bf","status":0,"value":null}" 

Connection shut down 
Released connection is not reusable. 
Releasing connection [HttpRoute[{}->http://localhost:21857]][null] 

Notifying no-one, there are no waiting threads 
Get connection: HttpRoute[{}->http://localhost:21857], timeout = 120000 
[HttpRoute[{}->http://localhost:21857]] total kept alive: 0, total issued: 0, total allocated: 0 out of 2000 
No free connections [HttpRoute[{}->http://localhost:21857]][null] 
Available capacity: 2000 out of 2000 [HttpRoute[{}->http://localhost:21857]][null] 
Creating new connection [HttpRoute[{}->http://localhost:21857]] 
Connecting to localhost:21857 

CookieSpec selected: best-match 
Auth cache not set in the context 
Attempt 1 to execute request 
Sending request: POST /session/ca11276138b32a18a58c89086c4365bf/execute HTTP/1.1 
>> "POST /session/ca11276138b32a18a58c89086c4365bf/execute HTTP/1.1[\r][\n]" 

>> "Accept: application/json, image/png[\r][\n]" 
>> "Content-Type: application/json; charset=utf-8[\r][\n]" 
>> "Content-Length: 28034[\r][\n]" 
>> "Host: localhost:21857[\r][\n]" 

>> "Connection: Keep-Alive[\r][\n]" 
>> "[\r][\n]" 
>> POST /session/ca11276138b32a18a58c89086c4365bf/execute HTTP/1.1 

>> Accept: application/json, image/png 
>> Content-Type: application/json; charset=utf-8 
>> Content-Length: 28034 
>> Host: localhost:21857 
>> Connection: Keep-Alive 
>> "{"args":["id=username"],"script":"return (function() { return (function(){return function(){function h(a){throw a;}var j=void 0,k=!0,m=null,n=!1,o=this;\nfunction aa(a){var b=typeof a;if(\"object\"==b)if(a){if(a instanceof Array)return\"array\";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if(\"[object Window]\"==c)return\"object\";if(\"[object Array]\"==c||\"number\"==typeof a.length&&\"undefined\"!=typeof a.splice&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"splice\"))return\"array\";if(\"[object Function]\"==c||\"undefined\"!=typeof a.call&&\"undefined\"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable(\"call\"))return\"function\"}else return\"null\";\nelse if(\"function\"==b&&\"undefined\"==typeof a.call)return\"object\";return b}function p(a){return a!==j}function q(a){return\"string\"==typeof a}function r(a){return\"function\"==aa(a)}function ba(a){a=aa(a);return\"object\"==a||\"array\"==a||\"function\"==a}var ca=Date.now||function(){return+new Date};function s(a,b){function c(){}c.prototype=b.prototype;a.B=b.prototype;a.prototype=new c};function t(a){u.call(this,a)}s(t,u);function da(a,b){var c=a.length-b.length;return 0<=c&&a.indexOf(b,c)==c}function ea(a,b){for(var c=1;c(0==z[1].length?0:parseInt(z[1],10))?1:0)||((0==y[2].length)<(0==z[2].length)?-1:(0==\ny[2].length)>(0==z[2].length)?1:0)||(y[2]z[2]?1:0)}while(0==c)}return c}var ga={};function ha(a){return ga[a]||(ga[a]=(\"\"+a).replace(/\\-([a-z])/g,function(a,c){return c.toUpperCase()}))};var w,ia,ja,ka,la;function ma(){return o.navigator?o.navigator.userAgent:m}la=ka=ja=ia=w=n;var x;if(x=ma()){var na=o.navigator;w=0==x.indexOf(\"Opera\");ia=!w&&-1!=x.indexOf(\"MSIE\");ka=(ja=!w&&-1!=x.indexOf(\"WebKit\"))&&-1!=x.indexOf(\"Mobile\");la=!w&&!ja&&\"Gecko\"==na.product}var A=w,B=ia,C=la,D=ja,oa=ka,pa;\na:{var qa=\"\",E;if(A&&o.opera)var ra=o.opera.version,qa=\"function\"==typeof ra?ra():ra;else if(C?E=/rv\\:([^\\);]+)(\\)|;)/:B?E=/MSIE\\s+([^\\);]+)(\\)|;)/:D&&(E=/WebKit\\/(\\S+)/),E)var sa=E.exec(ma()),qa=sa?sa[1]:\"\";if(B){var ta,ua=o.document;ta=ua?ua.documentMode:j;if(ta>parseFloat(qa)){pa=\"\"+ta;break a}}pa=qa}var va={};function F(a){return va[a]||(va[a]=0<=fa(pa,a))}var wa={};function xa(a){return wa[a]||(wa[a]=B&&document.documentMode&&document.documentMode>=a)};var G=window;function H(a,b){this.code=a;this.message=b||\"\";this.name=ya[a]||ya[13];var c=Error(this.message);c.name=this.name;this.stack=c.stack||\"\"}s(H,Error);\nvar ya={7:\"NoSuchElementError\",8:\"NoSuchFrameError\",9:\"UnknownCommandError\",10:\"StaleElementReferenceError\",11:\"ElementNotVisibleError\",12:\"InvalidElementStateError\",13:\"UnknownError\",15:\"ElementNotSelectableError\",19:\"XPathLookupError\",23:\"NoSuchWindowError\",24:\"InvalidCookieDomainError\",25:\"UnableToSetCookieError\",26:\"ModalDialogOpenedError\",27:\"NoModalDialogOpenError\",28:\"ScriptTimeoutError\",32:\"InvalidSelectorError\",35:\"SqlDatabaseError\",34:\"MoveTargetOutOfBoundsError\"};\nH.prototype.toString=function(){return\"[\"+this.name+\"] \"+this.message};var za,Aa,Ba,Ca,Da,Ea,Fa;Fa=Ea=Da=Ca=Ba=Aa=za=n;var I=ma();I&&(-1!=I.indexOf(\"Firefox\")?za=k:-1!=I.indexOf(\"Camino\")?Aa=k:-1!=I.indexOf(\"iPhone\")||-1!=I.indexOf(\"iPod\")?Ba=k:-1!=I.indexOf(\"iPad\")?Ca=k:-1!=I.indexOf(\"Android\")?Da=k:-1!=I.indexOf(\"Chrome\")?Ea=k:-1!=I.indexOf(\"Safari\")&&(Fa=k));var Ga=B,Ha=Aa,Ia=Ba,Ja=Ca,Ka=Da,La=Ea,Ma=Fa;a:{var J;if(za)J=/Firefox\\/([0-9.]+)/;else{if(Ga||A)break a;La?J=/Chrome\\/([0-9.]+)/:Ma?J=/Version\\/([0-9.]+)/:Ia||Ja?J=/Version\\/(\\S+).*Mobile\\/(\\S+)/:Ka?J=/Android\\s+([0-9.]+)(?:.*Version\\/([0-9.]+))?/:Ha&&(J=/Camino\\/([0-9.]+)/)}J&&J.exec(ma())};var Na;function K(a){return Oa?Na(a):B?0<=fa(document.documentMode,a):F(a)}var Oa=function(){if(!C)return n;var a=o.Components;if(!a)return n;try{if(!a.classes)return n}catch(b){return n}var c=a.classes,a=a.interfaces,d=c[\"@mozilla.org/xpcom/version-comparator;1\"].getService(a.nsIVersionComparator),e=c[\"@mozilla.org/xre/app-info;1\"].getService(a.nsIXULAppInfo).platformVersion;Na=function(a){return 0<=d.C(e,\"\"+a)};return k}(),Pa=B&&9<=document.documentMode,Qa=B&&!Pa;D||A||C&&K(3.5)||B&&K(8);function u(a){this.stack=Error().stack||\"\";a&&(this.message=\"\"+a)}s(u,Error);u.prototype.name=\"CustomError\";function Ra(a,b){b.unshift(a);u.call(this,ea.apply(m,b));b.shift()}s(Ra,u);Ra.prototype.name=\"AssertionError\";function Sa(a,b){for(var c=a.length,d=q(a)?a.split(\"\"):a,e=0;ec?m:q(a)?a.charAt(c):a[c]}function M(a,b){var c;a:if(q(a))c=!q(b)||1!=b.length?-1:a.indexOf(b,0);else{for(c=0;c=a&&0<=c&&255>=c&&0<=d&&255>=d&&0<=b&&1>=b)return[a,c,d,b]}return[]}var tb=/^(?:rgb)?\\((0|[1-9]\\d{0,2}),\\s?(0|[1-9]\\d{0,2}),\\s?(0|[1-9]\\d{0,2})\\)$/i;function ub(a){var b=a.match(tb);if(b){var a=Number(b[1]),c=Number(b[2]),b=Number(b[3]);if(0<=a&&255>=a&&0<=c&&255>=c&&0<=b&&255>=b)return[a,c,b]}return[]};var R={};R.r=function(){var a={D:\"http://www.w3.org/2000/svg\"};return function(b){return a[b]||m}}();R.j=function(a,b,c){var d=P(a);try{if(!d.implementation||!d.implementation.hasFeature(\"XPath\",\"3.0\"))return m}catch(e){return m}try{var g=d.createNSResolver?d.createNSResolver(d.documentElement):R.r;return d.evaluate(b,a,g,c,m)}catch(f){C&&\"NS_ERROR_ILLEGAL_VALUE\"==f.name||h(new H(32,\"Unable to locate an element with the xpath expression \"+b+\" because of the following error:\\n\"+f))}};\nR.g=function(a,b){(!a||1!=a.nodeType)&&h(new H(32,'The result of the xpath expression \"'+b+'\" is: '+a+\". It should be an element.\"))};R.b=function(a,b){var c=function(){var c=R.j(b,a,9);return c?(c=c.singleNodeValue,A?c:c||m):b.selectSingleNode?(c=P(b),c.setProperty&&c.setProperty(\"SelectionLanguage\",\"XPath\"),b.selectSingleNode(a)):m}();c===m||R.g(c,a);return c};\nR.c=function(a,b){var c=function(){var c=R.j(b,a,7);if(c){var e=c.snapshotLength;A&&!p(e)&&R.g(m,a);for(var g=[],f=0;fa.clientWidth||a.scrollHeight>a.clientHeight||\"fixed\"==c||\"absolute\"==c||\"relative\"==c))return a;return m}\nfunction Db(a){var b=new Xa;if(1==a.nodeType)if(a.getBoundingClientRect)a=Ab(a),b.x=a.left,b.y=a.top;else{var c=jb(O(a));var d,e=P(a),g=zb(a,\"position\"),f=C&&e.getBoxObjectFor&&!a.getBoundingClientRect&&\"absolute\"==g&&(d=e.getBoxObjectFor(a))&&(0>d.screenX||0>d.screenY),i=new Xa(0,0),l;d=e?9==e.nodeType?e:P(e):document;if(l=B)if(l=!xa(9))l=O(d),l=!ab(l.f);l=l?d.body:d.documentElement;if(a!=l)if(a.getBoundingClientRect)d=Ab(a),a=jb(O(e)),i.x=d.left+a.x,i.y=d.top+a.y;else if(e.getBoxObjectFor&&!f)d=\ne.getBoxObjectFor(a),a=e.getBoxObjectFor(l),i.x=d.screenX-a.screenX,i.y=d.screenY-a.screenY;else{f=a;do{i.x+=f.offsetLeft;i.y+=f.offsetTop;f!=a&&(i.x+=f.clientLeft||0,i.y+=f.clientTop||0);if(D&&\"fixed\"==zb(f,\"position\")){i.x+=e.body.scrollLeft;i.y+=e.body.scrollTop;break}f=f.offsetParent}while(f&&f!=a);if(A||D&&\"absolute\"==g)i.y-=e.body.offsetTop;for(f=a;(f=Cb(f))&&f!=e.body&&f!=l;)if(i.x-=f.scrollLeft,!A||\"TR\"!=f.tagName)i.y-=f.scrollTop}b.x=i.x-c.x;b.y=i.y-c.y}else c=r(a.k),i=a,a.targetTouches?\ni=a.targetTouches[0]:c&&a.k().targetTouches&&(i=a.k().targetTouches[0]),b.x=i.clientX,b.y=i.clientY;return b}function Eb(a){var b=a.offsetWidth,c=a.offsetHeight,d=D&&!b&&!c;return(!p(b)||d)&&a.getBoundingClientRect?(a=Ab(a),new N(a.right-a.left,a.bottom-a.top)):new N(b,c)};function U(a,b){return!!a&&1==a.nodeType&&(!b||a.tagName.toUpperCase()==b)}var Fb={\"class\":\"className\",readonly:\"readOnly\"},Gb=[\"checked\",\"disabled\",\"draggable\",\"hidden\"];function Hb(a,b){var c=Fb[b]||b,d=a[c];if(!p(d)&&M(Gb,c))return n;if(c=\"value\"==b)if(c=U(a,\"OPTION\")){var e;c=b.toLowerCase();if(a.hasAttribute)e=a.hasAttribute(c);else try{e=a.attributes[c].specified}catch(g){e=n}c=!e}c&&(d=[],hb(a,d,n),d=d.join(\"\"));return d}\nvar Ib=\"async,autofocus,autoplay,checked,compact,complete,controls,declare,defaultchecked,defaultselected,defer,disabled,draggable,ended,formnovalidate,hidden,indeterminate,iscontenteditable,ismap,itemscope,loop,multiple,muted,nohref,noresize,noshade,novalidate,nowrap,open,paused,pubdate,readonly,required,reversed,scoped,seamless,seeking,selected,spellcheck,truespeed,willvalidate\".split(\",\"),Jb=/[;]+(?=(?:(?:[^\"]*\"){2})*[^\"]*$)(?=(?:(?:[^']*'){2})*[^']*$)(?=(?:[^()]*\\([^()]*\\))*[^()]*$)/;\nfunction Kb(a){var b=[];Sa(a.split(Jb),function(a){var d=a.indexOf(\":\");0c)&&h(new t(\"Illegal Index: \"+a));b.length<=c&&h(new t(\"Index out of range: \"+a));return[b[c]]},name:function(a,b){return L(b,function(b){return Hb(b,\"name\")==a})},value:function(a,b){return L(b,function(b){return Hb(b,\"value\")===a})}};var Z={w:function(a,b){return 0==a.lastIndexOf(\"//\",0)?Z.q(a,b):0==a.lastIndexOf(\"document.\",0)?Z.i(a,b):Z.l(a,b)},s:function(a,b){return ac(b||P(G),function(b){return b.alt==a})},t:function(a,b){return ac(b||P(G),function(b){return b.className==a})},i:function(a){var b=m;try{b=eval(a)}catch(c){return m}return b?b:m},v:function(a,b){return Zb({id:a},b)},l:function(a,b){return Z.id(a,b)||Z.name(a,b)},z:function(a,b){var c=b||P(G);O(c);var d=$a(document,\"*\",m,c),c=a.split(\" \");for(c[0]=\"name=\"+c[0];c.length;){var e=\nc.shift(),g=\"value\",f=e.match(/^([A-Za-z]+)=(.+)/);f&&(g=f[1].toLowerCase(),e=f[2]);(f=$b[g])||h(new t(\"Unrecognised element-filter type: '\"+g+\"'\"));d=f(e,d)}return 0<< "HTTP/1.1 200 OK[\r][\n]" 


 you can see some code being printed also i think it is a bug of selenium webdriver or it has something to do with browser settings as i get the same kind of logs in firefox too but i am unable to figure out where actually the problem is.

On Sat, Nov 17, 2012 at 11:48 PM, Anurag Mala <anuragh...@gmail.com> wrote:
hi Shoaib,

Since you are initiating the Chrome browser and you wanted to turnoff the "Verbose" logging...then check this one.

DesiredCapabilities capabilities = DesiredCapabilities.chrome();
capabilities.setCapability("chrome.verbose", false);
WebDriver driver = new ChromeDriver(capabilities);

I believe this should solve the problem...for more options ...check the following link.

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To post to this group, send email to seleniu...@googlegroups.com.
To unsubscribe from this group, send email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msg/selenium-users/-/QxxZGjjAlkQJ.

For more options, visit https://groups.google.com/groups/opt_out.
 
 

Marco

unread,
Feb 15, 2013, 8:31:53 AM2/15/13
to seleniu...@googlegroups.com
Have you configured a logger (e.g., Log4j) that the driver libs could possibly hook into?
Reply all
Reply to author
Forward
0 new messages