Forum Discussion

eflyerman's avatar
eflyerman
Occasional Contributor
7 years ago

How to start chrome in incognito from keyword test

Chrome keeps pre-filling input fields and image upload elements.  I tried to clear cache but fields are still pre-populated.

 

How can I start chrome in incognito mode to avoid pre-filling the fields?

 

Thanks

9 Replies

  • tristaanogre's avatar
    tristaanogre
    Esteemed Contributor

    You don't need incognito mode I don't think.   Check out the following:

    Additional Recommended Settings

    We also recommend that you configure certain Google Chrome settings as described below. While these settings are not necessarily required for automated testing, using them will prevent unexpected browser behavior and improve Chrome’s performance during test recording and test runs.

    • From Chrome’s main menu, select Settings.

      – or –

      Navigate to the chrome://settings page.

    • On the Basics page:

      • Set On startup to Open the home page.

      • In Home page, select Open this page: and enter about:blank.

      Using a blank home page will prevent capturing of superfluous web pages during test recording and improves the browser startup performance.

    • On the Personal Stuff page:

      • Set the Passwords option to Never save passwords.

      • Uncheck Enable Autofill to fill out web forms in a single click.

      This will prevent unexpected behavior when filling forms during test recording and test runs.

    This is part of a larger article.

    https://support.smartbear.com/testcomplete/docs/app-testing/web/general/preparing-browsers/chrome.html

    • eflyerman's avatar
      eflyerman
      Occasional Contributor

      So you can't open incognito from keyword test?  

       

      I have tried your suggestion.  Doesn't work.  Tried it before posting the question here.  The test runs fine in incognito mode.  In fact, incognito mode is the only thing that reliably works consistently.

       

      I don't have a dedicated testing machine.  Changing useful functionality for %99.98 of my browsing to accomplish %0.02 percent of my testing needs doesn't sound like a useful solution anyway.

       

      Very frustrated with keyword testing at this point.  It has extremely limited functionality.  The recording feature is mostly useless because every step and almost every object has to be edited manually afterwards.  I can start the browser in incognito from a script but if I have to write scripts to use important functionality, I may as well use scripts for everything and use selenium for free.   

      • tristaanogre's avatar
        tristaanogre
        Esteemed Contributor

        Not saying you can't use incognito mode... saying that there is a recommended way of running automation against Chrome that makes incognito mode unnecessary.

         

        As for not having a dedicated testing environment... How can you guarantee that, when you execute your tests, some plug-in, background software, system configuration option, etc., isn't interfering with your tests?  My first QA job was not in software but in manufacturing electronic components.  You don't test mil spec 0.02 % tolerance resistors that are going up in the space shuttle in your Honda accord.  You have set environments to make sure that you control all the conditions in which the components are being tested so that, if something does go wrong, you know it's not due to some unknown factor.  Even manually testing software has, as a best practice, some sort of VDI or VM or some sort of lab for executing the tests to make sure that it is functioning well.  Automation needs it even more so.

         

        As for starting the browser in incognito in script... if it can be done in script, it can be done in a keyword test.  That's what "Code Snippets" are for. Or, for that matter, simply create the script function to run the browser and call it from the keyword test.  Use the keyword test for everything else, but fire up the browser via script.  Nothing wrong with mixing the two.

         

        As for TC versus Selenium... your choice. I've used Selenium... and honestly, I find TC to be a lot more intuitive.  To get the true power of Selenium you need to be a pretty decent developer of Java software... and I'm not that.  I know enough to do what I need to do in TC (learning more every day, though) and the rest of the TC tool kind of helps me along.  If I had my druthers, I'd write most of the stuff in script because that's what I learned on "back in the day", but keyword tests are a good way to get started in the TC tool.

         

        As Marsha_R said, though... if you have specific problems, we're happy to help.  Just fire off the questions and we'll give you a hand.