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

how to write ciertification in QTP?

0 Answers  


i am looking for HP QTP automated testing software, do you offers reselling this software or should i directly purchase with HP

1 Answers   HP,


How do you select which automation tool is best suited for you?

0 Answers  


Explain what sikuli is?

0 Answers  


What is test automation?

0 Answers  






ihave one doubt in manual testing? what is the testing process

1 Answers   DELL,


WHAT WE CAN NOT DO WITH QTP? GIVE 5 POINTS.(EXCEPT PERFOMANCE)

0 Answers  


what is the dictionary objects in QTP? and what is method of vb script using virtual object wizard........

0 Answers   Quintegra,


you have any interaction with clients?

2 Answers   Mind Tree,


Can we find all links on a web page?

0 Answers  


I was asked these questions during a job interview question. I totally stumbled on # 1 and for # 2 even though I answered but not a very convincing way. I would appreciate a concise and well phrased asnwers: 1) During SDLC, when would you be asked to take it "offline" 2) Throughout SDLC process, where would you implement test automation and why?

0 Answers  


what is critical test case ? please give an example .

0 Answers  


Categories