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
Answer / punj
Set Obj=browser().page().link()
obj.object.currentstyle.color
will give the color
Is This Answer Correct ? | 1 Yes | 0 No |
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 |
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 |
Is automation testing in agile methodology useful or not?
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
how to import specifically 2nd column elements to runtime datatable in excel sheet if it contains 3 columns
what testing activity you may want to automate?
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.
What is the difference between close and quit command?
How will you automate basic “login” functionality test cases for an application?
Explain what is the hybrid framework?
why we cannot apply check points in compile modules?
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
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
Any kind of test which you think should not be automated?