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 |
How to download QTP 9.5 Trail version? please explain the complete process?
what is the for identifying color of the object
6. Who will write the use case? 7. What is web based application?
Tell me what is the purpose of getoptions() method?
Highlight attributes of good framework?
Simplify the term defect severity.
Tell me how a text written in a text field could be cleared?
What is Bidirectional Tracebility, how u use it.
what is the difference or comparison between QTP and rational? and which tool is better to use?
Tell me what is tsl? What 4gl is it similar too?
What is test automation or automation testing?
Can object repository be kept in version control and Database(DB) backed up daily ?