how can we convert variable type “uielement” to variable type “img”
Use a Take Screenshot activity and pass it the UiElement variable in the Element parameter.
so i’m actually navigating to pdf’s page (that contains image). How can i read the img in the pdf and veriy it with another img file (.png)?
basically, can we anyway read the img from pdf and store it somewhere so that it becomes easy to compare the same with another .png file.
This should be possible, although a little tricky. If the image is in the same place on the pdf every time then you can select just that region as the UiElement and screenshot it. I believe there are some image comparison activities on Go! I’ve never used any but you should experiment with them and see which works best.
few questions here;
1.screenshot will be of the entire screen and not the particular part of it right?
2.There are certain buttons scrapped from the web which are not a part of the pdf. Hence,false result.
You can tell the screenshot activity to use a certain part of the screen so if the image is in the same spot every time you can anchor to some common element like the window title bar and then use the clipping region to offset to the image you need.
what if the scrapped image has few buttons that are not a part of the img in pdf. Is it then possible to compare?
You would need it without the buttons, I think. It could be possible to turn down the accuracy on the image comparison activities just enough to ignore the buttons, but I don’t know if that would be reliable.
i guess the image should be of same size,resolution etc. for the message “true”!
It won’t work if any of these misses