Question
Accenture Brazil
BR
Last activity: 7 Jan 2025 10:32 EST
How to start chrome in incognito mode v22?
How to interrogate and how to start the web page in incognito mode and for Google Chrome in v22?
-
Reply
-
Share this page Facebook Twitter LinkedIn Email Copying... Copied!
Pegasystems Inc.
US
@Jonathan PereiraIn order for you to be able to interrogate or interact with Chrome in incognito mode, you need to do three things;
- Make sure that the Pega Browser Extension is allowed in Incognito mode in your browser's settings for the extension.
- Change your application's StartMethod to MonitorAll instead of Start and set StartOnProjectStart to true.
- In your Start automation for the application, use the Process.Start method to launch Chrome with the arguments; -incognito "https://www.WhereverYouWantToNavigateTo.edu". If you are planning to interrogate the application, I would launch Chrome from the command line.
Pegasystems Inc.
US
@ThomasSasnett Here is a screenshot of my automation and the application properties I updated.
Pegasystems Inc.
US
@ThomasSasnettOne other thing I will add is that you can only automate one "mode" of either Chrome or Edge at a time. We may enhance this functionality in the future, but for now you can either work with Chrome incognito and Edge in regular (or vice versa) if you needed two different instances of an application. You would not be able to work with Chrome incognito and Chrome regular at the same time. You'd need to close one entirely before opening the other to allow the extension to launch messaging host again to re-attach.
Updated: 7 Jan 2025 12:45 EST
HCA Healthcare
US
@Jonathan PereiraTo start Chrome in incognito mode and automate a webpage, you can use Selenium. First, install Selenium using pip install selenium
. Then, configure Chrome to start in incognito mode by adding --incognito
to Chrome options. For example, in Python, use from selenium import webdriver
and set up Chrome with chrome_options.add_argument("--incognito")
. Launch Chrome using webdriver.Chrome()
and open a webpage with driver.get("https://www.example.com")
. To interact with elements, use methods like find_element()
with XPath, CSS selectors, or IDs. For instance, you can locate a search box using driver.find_element("name", "q")
and perform actions like send_keys()
or submit()
. Always ensure you have the correct ChromeDriver version for your browser. This approach allows you to run tests or automate tasks in incognito mode efficiently
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.
Pegasystems Inc.
US
@SairohithUsing Selenium is not really an option in this case and not relevant to the question. While Selenium might be OK for basic web testing, automating an entire application reliably is best done with Pega Robotics. In this case, the default behavior of the Pega Robotics application is to launch Edge or Chrome in standard mode and not incognito or inprivate. The OP was asking how they might do that with Pega Robotics, so your suggestion wouldn't really help there.
Updated: 7 Jan 2025 12:45 EST
HCA Healthcare
US
@ThomasSasnett To launch Chrome in incognito mode using Pega Robotics, you need to modify the Chrome adapter configuration. Open Pega Robotics Studio and go to the Chrome adapter settings. In the Arguments
property of the adapter, add --incognito
to the list of command-line arguments. This tells Chrome to start in incognito mode every time it's launched through Pega Robotics. Ensure the Path
property of the adapter points to the correct Chrome executable. After setting up these properties, save the changes and test the automation to confirm that Chrome opens in incognito mode. Pega Robotics relies on adapter configurations to manage browser behavior, so changing these settings is the most reliable way to achieve your goal. Unlike Selenium, which is often used for testing, Pega Robotics is designed for automating entire applications and can handle this use case effectively
⚠ This is a GenAI-powered tool. All generated answers require validation against the provided references.
Pegasystems Inc.
US
@SairohithThis isn't technically accurate. There is no "arguments" property of the web application. There is an "AdditionalArguments" property where you could enter "-icognito" (without the quotation marks) to start the application incognito without using the automation I posted above.
There is also no Path property to set as the application launches either Chrome or Edge automatically based on which one you selected. I believe when you searched for this answer, the AI confused a windows application and a web one as in the past, you'd need to use a Windows application to launch Chrome or Edge this way and it may have retrieved that details from an older response or document.
Using the additional arguments is a bit easier since you do not need to create an automation to launch the browser. While either way will work, using the explicit automation allows you as the developer to actually see how the browser is being launched versus relying on how the product does it internally assuming you want to follow that part. If you simply need to interrogate and then use the browser incognito at runtime, then using the additional arguments property is certainly an option. You will need to ensure in either case, that no other instances of Chrome are running on startup of the automation. If they are, you will need to close them before starting the application.