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 |
Does automation replace manual testing?
you have any interaction with clients?
What is Automation Testing Framework
Tell me how could ajax controls be handled in webdriver?
How to find that tools work well with your existing system?
What generally is the structure of a framework?
What is testng and why is it better than junit?
what is dynamic window and dynamic model ? (worksoft automation tool)
Tell me what is intellij?
Generic function for selecting a Radio Button in a Dialog
Simplify the term defect severity.
How do you plan test automation?