Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


what is the command for identifing the color of the object.
please help me ? my numberis 9916800532

Answers were Sorted based on User's Feedback



what is the command for identifing the color of the object. please help me ? my numberis 9916800532..

Answer / punj

Set Obj=browser().page().link()

obj.object.currentstyle.color

will give the color

Is This Answer Correct ?    1 Yes 0 No

what is the command for identifing the color of the object. please help me ? my numberis 9916800532..

Answer / messai

This method Object.currentStyle.color can be used for
any object to find the font color. You will get many
attributes falls under currentstyle

Is This Answer Correct ?    1 Yes 0 No

what is the command for identifing the color of the object. please help me ? my numberis 9916800532..

Answer / sayonita

e.g. You have a button colored. You want to get the color of the button. So the code will be:
WebElement ButtonColor=driver.findElement(r.getLocator("BtnColor")); //BtnColor is the element whose xpath I have mentioned in a properties file
String color=status.getCssValue("background-color"); //Captures the color and stores in a variable
System.out.println(color); //prints the color of the button
String hex = Color.fromString(color).asHex(); //convert this color code into hexadecimal format
System.out.println(hex); //print the color code and then you compare in your script

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Automation Testing AllOther Interview Questions

Tell us how can you create html test report from your test script?

0 Answers  


Suppose we r running a test which have 7 to 8 steps for different functionallity of and object..and suppose upto 4 step test passes but after 5th step test fails. what u will do in this condition will u start the test again or will u consider that rest steps will be working fine.

1 Answers   Logica CMG,


Tell me how would you test your own element locator?

0 Answers  


Tell me what criteria do you consider for automating a test?

0 Answers  


List down the primary features of a good automation tool?

0 Answers  


wat is database testing....how to develop data driven framework in selenium enviromnent. please explaing in detail

0 Answers  


How can u enter text in one particular text box? if one webpage contain multiple text boxes, all text boxes with same properties there in no index and Location properties

2 Answers  


Where to maintain information like login, password and url?

0 Answers  


What is hybrid automation?

0 Answers  


Stop automating the tests which run once?

0 Answers  


How will you choose a tool for test automation?

1 Answers  


What criteria do you consider for automating a test?

0 Answers  


Categories