Reputation: 11
WebDriver driver = new FirefoxDriver();
driver.manage().window().maximize();
driver.get("https://news.google.co.in/nwshp?hl=en&tab=wn&ei=zJBuVe3MGYukuQTrlIDAAQ&ved=0CAUQqS4oBQ");
driver.manage().timeouts().implicitlyWait(30,TimeUnit.SECONDS);
driver.findElement(By.id("gbqfq")).sendKeys("Veenita");
System.out.println("Font Size is "+ driver.findElement(By.id("gbqfq")).getCssValue("font-size"));
System.out.println("Font Color is "+driver.findElement(By.id("gbqfq")).getCssValue("font-color"));
System.out.println("Font Background Color is "+driver.findElement(By.id("gbqfq")).getCssValue("background-color"));
System.out.println("Font Type is "+driver.findElement(By.id("gbqfq")).getCssValue("font-type"));
O/P is:
Font Size is 16px
Font Color is
Font Background Color is transparent
Font Type is
Why font color and font type is not getting retrieved from my code?
Upvotes: 1
Views: 2564