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

Is automation testing in agile methodology useful or not?

0 Answers  


I am surekha new commer for this site? I have some doubt's pls clarify it..... I finished my B.tech and S/w Testing Course Now iam searching for a job in Testing, I did not have any experience in real time projects. Any body can send me the sample Testcases,Srs,Matrix for Banking,ERP Projects etc.Here is my email id surekhai@yahoo.com

1 Answers  


how to import specifically 2nd column elements to runtime datatable in excel sheet if it contains 3 columns

0 Answers  


what testing activity you may want to automate?

2 Answers  


what is the importance of action in QTP & When it need to use it ? I m getting it please expian it me with proper example.

0 Answers  


What is the difference between close and quit command?

0 Answers  


How will you automate basic “login” functionality test cases for an application?

0 Answers  


Explain what is the hybrid framework?

0 Answers  


why we cannot apply check points in compile modules?

0 Answers  


I want to test a mobile software by an automation tool which is a IP telephony based software designed for both ios and android phone, basically this apps is develop for make call though few low cost audio codecs from Aircraft to Ground and Ground to Aircraft so anyone can suggest me which testing tool we can use for it

0 Answers   Tech Mahindra,


i have one answer from you that today the test cases are not stored in the database(SQL server 2005). But in automation testing where does the test case store? plz tell me... i have more confusion

0 Answers  


Any kind of test which you think should not be automated?

0 Answers  


Categories