In my app I submit app and the result page displays bar code, which can only be viewed by scrolling down the resul page. I tried below
- Using innerhtml capture the content and store in a file with extn .html say barcode.html. If the result page is up and you then bring up the barcode.html file, I can view the bar code. Once the result page is closed and later I bring up the barcode.html, I don't see the barcode image, just a simple "X" image.
- Tried using capturebitmap.But when you open the stored file nothing is viewed
Browser("name:=.*").Page("title:=.*").webelement(" html id:=CCTnC").CaptureBitmap FileName, True
- Select all content of the page and paste it in word doc, but the barcode image is not stored.
Has anyone encountered such scenario, if yes then please share how you captured the barcode image and how were you able to view the same later.
Sorry for asking a dumb question. But can you please elaborate like what should I be looking for. I do remember viewing source of the page that has the barcode image and it seems as if a certain file is applied. When I ran spy on the image itself for "file name" property it has value "barcode". Class is "Image". When I get to office I will post the page view source code snippet.
If run below code then no image stored in .png
TimeStamp = Hour(Now()) & "-" & Minute(Now()) & "-" & Second(Now())
FileExtension = "_screenshot.png"
FileName = Environment.Value("TestDir") & "\Barcode_" & TimeStamp & FileExtension
Browser("name:=.*").Page("title:=.*").image("file name:=barcode").CaptureBitmap FileName,True
If insert below code between line 3 & 4, I do see the image in .png file. Seems highlighting the object before capture does the trick. Any comments
[ QUOTE ]
Sounds like a timing issue, what if you put a Wait(2) b/n 3 and 4?
[/ QUOTE ]
My page having the image was already up when I was testing the code. I was not doing any action before the image is loaded, so not sure if wait() will be of any help. Also in actual run I am using B().P().Sync.
Thanks for your reply