java - Get background color of text from webpage -


my web application has primary , secondary search.

based on search term web application highlights first search term in blue color , second search term (or search within call) highlighted in purple color. done using java script in end not have access.

i need automate scenario, since color of element not seen in page source unable identify background color of element using selenium.

please suggest me suitable solution background color of searched terms

from understood far question is, wanted style anchor visiting search links. links can styled css property (e.g. color, font-family, background, etc.). in addition, links can styled differently depending on state in.

the 4 links states are:

a:link - normal, unvisited link a:visited - link user has visited a:hover - link when user mouses on a:active - link moment clicked 

you can change background color of link styling anchor tag directly in css external or inline file. can handled javascript or jquery styling attributes. go below example , play see if how needed links behave.

a:link {color:#ff0000;}      /* unvisited link*/ a:visited {color:#000000;}  /* visited link */ a:hover {color:#ff00ff;}  /* mouse on link */ a:active {color:#0000ff;}  /* selected link */ 

remember order process same

source:http://www.w3schools.com/css/css_link.asp

see if looking for.


Comments

Popular posts from this blog

java - activate/deactivate sonar maven plugin by profile? -

python - TypeError: can only concatenate tuple (not "float") to tuple -

java - What is the difference between String. and String.this. ? -