Skip to content

Commit

Permalink
Develop (#66)
Browse files Browse the repository at this point in the history
  • Loading branch information
namastey authored Feb 29, 2024
2 parents cf5cf5f + 05e873b commit dc7b69a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
5 changes: 0 additions & 5 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -160,11 +160,6 @@ Installation

Notes for running -b=anti_bot_chrome:
- When running tests on anti_bot_chrome, suppress the python warnings by adding -W switch

.. code-block:: bash
- nrobo -b anti_bot_chrome -W ignore::DeprecationWarning
- `When running from a datacenter (even smaller ones), chances are large you will not pass! Also, if your ip reputation at home is low, you won't pass!
>`_
- anti_bot_chrome will not work with --grid switch!
Expand Down
9 changes: 9 additions & 0 deletions nrobo/cli/launcher.py
Original file line number Diff line number Diff line change
Expand Up @@ -190,6 +190,15 @@ def launcher_command(exit_on_failure=True):
command.append(f"--alluredir")
command.append(f"{NREPORT.ALLURE_REPORT_PATH}")

if not args.pythonwarnings and args.browser == Browsers.ANTI_BOT_CHROME:
# Suppress DeprecationWarning when running in undetected_chromedriver
# Due to the following error:
# /Users/einsteinpanchdev/webdev/nrobo/venv/lib/python3.12/site-packages/undetected_chromedriver/__init__.py:363:
# DeprecationWarning: 'locale.getdefaultlocale' is deprecated and slated for removal in Python 3.15.
# Use setlocale(), getencoding() and getlocale() instead.
command.append(f"-W")
command.append(f"ignore::DeprecationWarning")

# Add single parameter commands by default
# That make sense.
# command.append("-V") # This setting is not working. With this, tests are even not running at all.
Expand Down

0 comments on commit dc7b69a

Please sign in to comment.