I want to take screenshot the whole entire web page at present available?

I tried your’s but not working. I think the problem is switching to Chrome app page. I have tried changing it - still not working. I need this badly - I would appreciate if you look at it and post a new one.
thanks a lot.

Can you share the workflow?
Thanks.

Hey - I’m surprised to know that the activity is working. Regarding your issue, may be because the URL is being redirected, try entering the redirected URL.If
you still want to go with the activity (not with chrome extension), I think there is also a solution somewhere in the forum to get the redirected URL programmatically(using http request activity).

Attached is the latest package I have with me. Good Luck!

WebScreenCapture.Activities.2.0.1.nupkg (8.3 KB)

Great! Thanks for the updated package - I appreciate it. I will first try with this package with IE. I had never done anything with URL redirection - any information would be helpful. Once again, thanks for looking into this.

I just tried it - getting the same error - enclosed below:

19.2.0+Branch.master.Sha.21b678a4c3a8b1362fcdd6e92496f991e5a7da37

Source: Save Image

Message: Save image failed. Check if the file name is a valid path

Exception Type: UiPath.Core.ImageOperationException

An ExceptionDetail, likely created by IncludeExceptionDetailInFaults=true, whose value is:
UiPath.Core.ImageOperationException: Save image failed. Check if the file name is a valid path ----> System.NullReferenceException: Object reference not set to an instance of an object.
at UiPath.Core.Image.SaveFile(String fileName)
— End of inner ExceptionDetail stack trace —
at UiPath.Core.Activities.ScopeActivity.OnFaulted(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.Invoke(NativeActivityFaultContext faultContext, Exception propagatedException, ActivityInstance propagatedFrom)
at System.Activities.Runtime.FaultCallbackWrapper.FaultWorkItem.Execute(ActivityExecutor executor, BookmarkManager bookmarkManager)

Here is the XAML - thanks.
Main.xaml (13.7 KB)

Few things:

  1. Looks likes you are still using old version ( I guess 2.0) .
  2. You did not provide output to the activity because of that you got above error.
  3. This activity doesn’t have to be inside open browser.
  4. Use redirected URL i.e https://www.gsaadvantage.gov/advantage/main/start_page.do

It worked - thanks a million for updating the version - I greatly appreciate it. I was able to capture the screen. My intention was to capture a search page but this site blocks it - so technically it works - not sure why it gets blocked when running through activity. Once again, thanks.

Can anyone let us know how to put the downloaded custom plugin to the Uipath Package Manager?
Coz though we copied the lastest version of the webscreencapture plugin it doesnt show up any such activity :frowning:

KIndly do your needful. Thanks in advance.

Can u please let me know why am i am unable to download your plugin?
I am facing some issues “Retrying ‘FindPackagesByIdAsyncCore’ for source ‘https://platform.uipath.com/nuget/activities/FindPackagesById()?id=‘WebScreenCapture.Activities’&semVerLevel=2.0.0’.
An error occurred while sending the request.
The remote name could not be resolved: ‘platform.uipath.com’”
NU1801: Failed to retrieve information about ‘WebScreenCapture.Activities’ from remote source ‘FindPackagesById’.

I have no clue as what is the solution for this?

Is it happening only for WebCapture activity or others as well?

Its happening for WebCapture activity so far i have tried with that activity alone. image

While trying to install, version drop-down is not getting enabled. Can u let me know if anything i could do from my end?

1 Like

I am facing another issue. When i run my bot i increase the image file size to suppose 100% and when i took screenshot is at 85%. Now when i run my bot it is not taking the exact picture bcoz the clipping region is changed. so how to handle this scenario.

1 Like

i cannot take full page screenshot using the your method.

Hi,

Its possible you can take whole page screenshot by using Take screenshot i tried with PDF.

Thanks,
Sneha

Hi,

I can take a screenshot on web page. Please share your workflow.

Thanks,

Nitin

@Snehamayi_Sneha

I think if you are using Mozilla , or chrome you can make an extension (already available in internet) then by sending hotkey you can take full page screenshot. For, Mozilla you have an extension called “fireshot” … After enabling your extension you can send ctrl+shift+y… To take full page screenshot

FireShot: Full Web Page Screenshots (♥♥♥♥♥) – Get this Extension for 🦊 Firefox (en-US)

Hope this helps!!!

Thanks,
Aman Sheik

1 Like

@vvaidya - The Custom activity shared by you definitely works for URL. But my need is to take the snapshot of active webpage (full page snapshot) already opened in IE. The Custom activity shared by you takes input as string (i.e. URL only). is there any way you can modify the same to take input as ‘Browser’ type variable (i.e. returned by opened browser activity of UiPath).

Hi tried this method, but got a picture like below,
need your help , would you please teach me how to do it ?

If you like you can invoke Python script,

script:
from selenium import webdriver
from selenium.webdriver.chrome.options import Options
from selenium.webdriver.chrome.service import Service
from webdriver_manager.chrome import ChromeDriverManager
import time

in_url is the url, in_path is location where you want to save the image

def get_screenshot(in_url, in_path):
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()))
driver.get(in_url)

wait to load the page (you can change according to size of your site)age

time.sleep(4)

#Get the size (height of the complete page)
height = driver.execute_script(
“return Math.max( document.body.scrollHeight, document.body.offsetHeight, document.documentElement.clientHeight, document.documentElement.scrollHeight, document.documentElement.offsetHeight )”)

chrome_options = Options()
chrome_options.add_argument("start-maximized")
chrome_options.add_argument("--headless")
chrome_options.add_argument(f"--window-size=1920,{height}")
chrome_options.add_argument("--hide-scrollbars")
driver = webdriver.Chrome(service=Service(ChromeDriverManager().install()), options=chrome_options)

driver.get(in_url)

wait to load the page (you can change according to size of your site)

time.sleep(10)

#try catch part is optional, this is just to avoid specific popup.
try:
driver.find_element_by_id(“L2AGLb”).click()
except:
pass
# take and save screenshot
driver.get_screenshot_as_file(in_path)
driver.close()