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 |
Tell us how can you create html test report from your test script?
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.
Tell me how would you test your own element locator?
Tell me what criteria do you consider for automating a test?
List down the primary features of a good automation tool?
wat is database testing....how to develop data driven framework in selenium enviromnent. please explaing in detail
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
Where to maintain information like login, password and url?
What is hybrid automation?
Stop automating the tests which run once?
How will you choose a tool for test automation?
What criteria do you consider for automating a test?