I try to get some website attribute (colour of the cell) and compare in Selenium.
When I put this:
javascript:window.getComputedStyle(document.getElementById("simple_cname"),null).getPropertyValue("background-color");
in Chrome Omnibox, I receive correct answer, but when I, by using storeEval or assertEval try to get this value it does not work correctly.
edit:
I put to selenium command like this. I use storeEval and when I echo the value it returns me this command. I use Firefox. I used Chrome just to chech if the command is correct. (it should be "rgb(220, 22, 92)" )
edit2:
Yes, the command is ok, but I have a problem with using it in Selenium-IDE tool. It do not returns the value when I use it with storeEval command.
log:
[info] script is: var test javascript:window.getComputedStyle(document.getElementById("simple_cname"),null).getPropertyValue("background-color"); echo test;
[info] Executing: |echo | ${test} | |
[info] echo: var test javascript:window.getComputedStyle(document.getElementById("simple_cname"),null).getPropertyValue("background-color"); echo test;
I put to selenium command like this. I use storeEval and when I echo the value it returns me this command. I use Firefox. I used Chrome just to chech if the command is correct. (it should be "rgb(220, 22, 92)" )