Forum Discussion

alisson_cruz's avatar
alisson_cruz
New Contributor
11 years ago

[Help] KeyWord Screenshot

Hello guys..



Does anyone know how to take a screen shot from a web page and save it?

I don't want to add it to the log but save it as a PNG file.



I tried to add a "Call Object Method", using  webpage.PagePicture() and then to use the method SaveToFile (parameters: "C:/Users/.../picture.png." and "null").

It didn't work but I'm sure that is something like that.





Thanks!

3 Replies

  • murugans1011's avatar
    murugans1011
    Regular Contributor
    did u tried.......



    Sub Main



    Sys.Desktop.Picture.SaveToFile "C:\test.png"



    End Sub
  • jorgesimoes1983's avatar
    jorgesimoes1983
    Regular Contributor
    You can use, something like this



    // get screenshot

    function picture(descricao)

    {



    var nomeficheiro;

    var DateTimeString;

    var pic = Sys.Desktop.Picture();





     // date format --> 28.02.2013 09h02m40s

      DateTimeString = aqConvert.DateTimeToFormatStr(aqDateTime.Now(),"%d.%m.%Y %Hh%Mm%Ss");  

      nomeficheiro = descricao+ "_" + DateTimeString;



       pic.SaveToFile("C:\\temp\\"+nomeficheiro+".jpg"); ;



    //   Log.Picture(pic, nomeficheiro);  

      }