We are building a new experience for our SmartBear Community.
This site is now read-only. You can still browse and search as usual. Learn More
This site is now read-only. You can still browse and search as usual. Learn More
I'm getting blank page while using page.PagePicture method. Kindly help.
Function TakeFullScreenshot(page) Dim screenshot screenshot = Project.Variables.REPORTPATH&"\\" & aqConvert.DateTimeToFormatStr(aqDateTime.Now(), "%m%d%Y_%H%M%S") & ".jpg" page.PagePicture().SaveToFile screenshot TakeFullScreenshot = screenshot End Function
Hi,
Just to be on the safe side: does the page exist and is rendered in the browser when you are taking screenshot?
Can you provide a code snippet that calls TakeFullScreenshot() function?
Hi Alex,
Yes, The page was fully loaded. It is a new customer registration form (CRM) where I've filled up all the values and before submitting the form, want to capture the entire page screenshot.
Dim uMobile, CustomerPanel
Set uMobile = Aliases.browser.pageUmobile3
v1 = GetIDType(getDicValue("IdType"))
Log.Message(v1)
Call uMobile.Panel(1).TextNode(v1).WaitProperty("VisibleOnScreen", True, 2000)
Call uMobile.Panel(1).TextNode(v1).Click()
...
...
<code to fill the new customer registration form>
...
...
...
'Click on ok button
Call uMobile.Panel(23).Panel(1).Panel(0).Panel(0).Panel(2).Panel(0).Button(1).Click()
Delay 1000
set nxtbtn = customerForm.Form(1).Panel(1).Panel(0).Panel(0).Panel(0).Panel(0).Button(1)
' Take screenshot of the full form before submitting
screenshotPath = ExtentManager.TakeFullScreenshot(uMobile)
Call ExtentManager.passTestWithScreenshot(Project.Variables.CURRENTTCID , Project.Variables.CURRENTTCDESC, screenshotPath)
'Click "Next" button on the customer registration form
Status = SafeClick(nxtbtn, 500, "Next button not found in the e registration form")
If Not Status Then
NewRegistration_Dealer = Status
Exit Function
End If
'click on Next
Call customerForm.Form(1).Panel(1).Panel(0).Panel(0).Panel(0).Panel(0).Button(1).Click()