Граф коммитов

2005 Коммитов

Автор SHA1 Сообщение Дата
Georgia Kokkinou a19b12478b
Remove `reset=True` from tests 2021-03-19 21:14:51 +02:00
Georgia Kokkinou 3b4219d0f9
Add some type annotations 2021-03-19 21:09:20 +02:00
Georgia Kokkinou 1e16513370
Improve profile dumping logic
Move the core implementation of profile dumping into a `dump_profile`
function, which can be used both internally when closing or restarting a
crashed browser and from the `execute()` method of `DumpProfileCommand`.
Also, make compression the default in `DumpProfileCommand`. Finally, do
not compress the tar archive of the crashed browser's profile when
restarting from a crash. We should avoid the extra compression/
decompression step as this is a short-lived tar file.
2021-03-16 17:10:50 +02:00
Georgia Kokkinou 3f7efc2490
Skip test_browser_profile_coverage locally 2021-03-15 16:01:47 +02:00
Georgia Kokkinou 9ea8e8a051
Rename temp dir of crashed browser's profile tar 2021-03-15 15:37:12 +02:00
Georgia Kokkinou aa1de922c9
Add reminder to update geckodriver prefs 2021-03-15 15:15:28 +02:00
Georgia Kokkinou f5bacaed84
Update manual_test.py
Running manual_test.py resulted in an error because the `xpi()` fixture
was called directly. Apply the fix suggested in
https://docs.pytest.org/en/stable/deprecations.html#calling-fixtures-directly
Also, use a custom profile instead of `FirefoxProfile` and update some
docstrings.
2021-03-15 13:44:36 +02:00
Georgia Kokkinou 1d3de72292
Reference our own issue instead of geckodriver's 2021-03-15 12:23:06 +02:00
Georgia Kokkinou d2aff836f4
Remove unused status string "Proxy Ready" 2021-03-15 11:09:44 +02:00
Georgia Kokkinou 403185a38a
Simplify profile location handling
1. In `deploy_firefox` do not use `driver.capabilities["moz:profile"]`
to get the profile location. Custom profiles, unlike profiles created
via `FirefoxProfile`, are used in-place, so we already know the
location.

2. In `launch_browser_manager`, `spawned_profile_path` and
`driver_profile_path` point to the same location now that we are using a
custom profile. Replace them with a single `browser_profile_path`
variable.

3. Rename `prof_folder` and `browser_profile_folder` to
`browser_profile_path` for consistency.

4. Improve naming of the temporary Firefox profile.
2021-03-15 11:03:10 +02:00
Georgia Kokkinou 2237822eab
Do not intercept profile location from logs 2021-03-08 09:58:48 +02:00
Georgia Kokkinou a355dc840d
Create user.js manually in custom profile
Geckodriver has a bug that makes it write the browser preferences we
set, as well as its own default browser preferences, to a user.js file
in the wrong profile directory when using a custom profile:
https://github.com/mozilla/geckodriver/issues/1844. As a temporary
workaround until this issue gets fixed, we create the user.js file
ourselves. In order to do this, we keep a copy of geckodriver's default
preferences in our code.

Closes #423
2021-03-03 13:16:15 +02:00
Georgia Kokkinou 7f51e50f44
Pass service_args to geckodriver
Fix a bug in PatchedGeckoDriverService that caused geckodriver not to
receive the service_args passed when starting the browser.
PatchedGeckoDriverService is a modified version of Selenium's Service
class and this bug has been fixed in the original version.
2021-03-03 13:16:15 +02:00
Georgia Kokkinou 51c0849cbd
Use custom browser profile
Use a custom profile by setting it as an argument via the Options class,
instead of using the FirefoxProfile class. This way geckodriver does not
delete it when crashing or closing. Also, remove some unused arguments
from the function that configures privacy settings in Firefox. Finally,
remove the code that clears driver.profile before calling driver.quit(),
as driver.profile is always None when using a custom profile.
2021-03-03 13:15:56 +02:00
Georgia Kokkinou daa6dba4e3
Enable stateful crawling and tests
Reenable stateful crawling and profile tests. Also, update the docs now
that stateful crawling is supported. Currently, stateful crawling is
broken, as geckodriver deletes the browser profile when closing or
crashing before we can archive it.
2021-03-01 17:18:00 +02:00
Stefan Zabka cb95ecc05f
Now handling all constraint notations in unpinned enviroment.yamls (#860)
* Now handling all constraint notations in unpinned enviroment.yamls

* Addressing review comments
2021-02-23 11:36:40 +01:00
vringar 9aaa3c0b87 Removed test_gcp.py 2021-02-22 18:38:05 +01:00
Stefan Zabka b29c3f4052
Data Aggregator Rewrite (#753)
* First steps in the rewrite

* Fixed import paths

* One giant refactor

* Fixing tests

* Adding mypy

* Removed mypy from pre-commit workflow

* First draft on DataAggregator

* Wrote a DataAggregator that starts and shuts down

* Created tests and added more empty types

* Got demo.py working

* Created sql_provider

* Cleaned up imports in TaskManager

* Added async

* Fixed minor bugs

* First steps at porting arrow

* Introduced TableName and different Task handling

* Added more failing tests

* First first completes others don't

* It works

* Started working on arrow_provider

* Implemented ArrowProvider

* Added logger fixture

* Fixed test_storage_controller

* Fixing OpenWPMTest.visit()

* Moved test/storage_providers to test/storage

* Fixing up tests

* Moved automation to openwpm

* Readded datadir to .gitignore

* Ran repin.sh

* Fixed formatting

* Let's see if this works

* Fixed imports

* Got arrow_memory_provider working

* Starting to rewrite tests

* Setting up fixtures

* Attempting to fix all the tests

* Still fixing tests

* Broken content saving

* Added node

* Fixed screenshot tests

* Fixing more tests

* Fixed tests

* Implemented local_storage.py

* Cleaned up flush_cache

* Fixing more tests

* Wrote test for LocalArrowProvider

* Introduced tests for local_storage_provider.py

* Asserting test dir is empty

* Creating subfolder for different aggregators

* New depencies and init()

* Everything is terribly broken

* Figured out finalize_visit_id

* Running two event loops kinda works???

* Rearming the event

* Introduced mypy

* Downgraded black in pre-commit

* Modifying the database directly

* Fixed formatting

* Made mypy a lil stricter

* Fixing docs and config printing

* Realising I've been using the wrong with

* Trying to figure arrow_storage

* Moving lock initialization in in_memory_storage

* Fixing tests

* Fixing up tests and adding more typechecking

* Fixed num_browsers in test_cache_hits_recorded

* Parametrized unstructured

* String fix

* Added failing test

* New test

* Review changes with Steven

* Fixed repin.sh and test_arrow_cache

* Minor change

* Fixed prune-environment.py

* Removing references to DataAggregator

* Fixed test_seed_persistance

* More paths

* Fixed test display shutdown

* Made cache test more robust

* Update crawler.py

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Slimming down ManagerParams

* Fixing more tests

* Update test/storage/test_storage_controller.py

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Purging references to DataAggregator

* Reverted changes to .travis.yml

* Demo.py saves locally again

* Readjusting test paths

* Expanded comment on initialize to reference #846

* Made token optional in finalize_visit_id

* Simplified test paramtetrization

* Fixed callback semantics change

* Removed test_parse_http_stack_trace_str

* Added DataSocket

* WIP need to fix path encoding

* Fixed path encoding

* Added task and crawl to schema

* Fixed paths in GitHub actions

* Refactored completion handling

* Fix tests

* Trying to fix tests on CI

* Removed redundant setting of tag

* Removing references to S3

* Purging more DataAggregator references

* Craking up logging to figure out test failure

* Moved test_values into a fixture

* Fixing GcpUnstructuredProvider

* Fixed paths for future crawls

* Renamed sqllite to official sqlite

* Restored demo.py

* Update openwpm/commands/profile_commands.py

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Restored previous behaviour of DumpProfileCommand

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Removed leftovers

* Cleaned up comments

* Expanded lock check

* Fixed more stuff

* More comment updates

* Update openwpm/socket_interface.py

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Removed outdated comment

* Using config_encoder

* Renamed tar_location to tar_path

* Removed references to database_name in docs

* Cleanup

* Moved screenshot_path and source_dump_path to ManagerParamsInternal

* Fixed imports

* Fixing up comments

* Fixing up comments

* More docs

* updated dependencies

* Fixed test_task_manager

* Reupgraded to python 3.9.1

* Restoring crawl_reference in mp_logger

* Removed unused imports

* Apply suggestions from code review

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Cleaned up socket handling

* Fixed TaskManager.__exit__

* Moved validation code into config.py

* Removed comment

* Removed comment

* Removed comment

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>
Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>
2021-02-22 17:51:32 +01:00
Stefan Zabka a81d80ad59
Pin python to 3.8.6 (#859)
* Update npm

* Repin

* Make sure python makes it into pinned environment

Co-authored-by: Sarah Bird <birdsarah@mozilla.com>
2021-02-16 18:34:21 +01:00
Georgia Kokkinou f9e38a396b
Fix behavior of failure_limit (#854)
* Set failure_limit default in config.py

Set the default value for failure_limit in config.py instead of setting
it in the TaskManager. Also, accept 0 as a valid value for
failure_limit.

* Rename failurecount to failure_count

* Clear failure_count on successful command sequence

Reset failure_count to 0 only at the end of each successfully completed
command sequence. Before it was reset after each successful command.
This would result in failures of subsequent commands that belonged to
different command sequences not triggering a CommandExecutionError
because failure_count was reset upon every InitializeCommand. Also,
update the docs to reflect the current behavior of failure_limit.

Closes #851

* Enable test_crash

* Fix some minor typos

* Test failure limit behavior

Move `test_crash` out of test_profile.py, as it does not depend on
profile saving support and rename it to `test_failure_limit_exceeded`,
which is more descriptive. Also, add two more tests to cover more
aspects of failure limit behavior.

* Use local test server in TaskManager tests

* Clarify failure_limit behavior in docs

Mention that the CommandExecutionError gets raised by the next command
sequence after failure_limit has been exceeded.

* Add type annotations for failure_limit property
2021-02-15 15:59:57 +01:00
vringar 078395c4ad Scoped on push for GitHub Actions
Closes #850
2021-01-29 12:35:10 +01:00
vringar 2576dca4c0 Hotifixing master 2021-01-29 12:24:20 +01:00
Stefan Zabka b252248899
Github Actions for OpenWPM (#838)
* First action test

* Fixing paths

* Adding cache to github actions

* Added badge

* Debugging

* Trying better caching

* More trying

* Trying tests

* Fixing tests

* Removed travis.yml

* Changed comment in re-tests.yaml

* Update environment.yaml

Co-authored-by: Steven Englehardt <se@senglehardt.com>

* Update .github/workflows/run-tests.yaml

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Update README.md

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Changed other references from Travis to CI

* Update .github/workflows/run-tests.yaml

Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>

* Restored cov:check for webextension tests

* Removed webextension fromt test matrix

* All tests should run to completion

Co-authored-by: Steven Englehardt <se@senglehardt.com>
Co-authored-by: Georgia Kokkinou <geor5ko@gmail.com>
2021-01-29 12:21:36 +01:00
jhabarsingh 8dad9fd212
Made taskmanager a context manager (#836) 2021-01-11 20:17:56 +01:00
Stefan Zabka 0b061bfa4b
Pyvirtualdisplay update (#844)
* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* Ported SaveScreenshotFullPage #763

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove custom function command and format code

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove duplicate append_command

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* generate new xpi

* Fixing tests

* Fixing tests

* Fixing up more tests

* Removed type annotations

* Fixing tests

* Fixing tests

* Removed command_executor

* Moved Commands to commands

* Fixing imports

* Fixed skipped test

* Removed duplicate append_command

* manual test breaking post-#807

* replacing with standard json function for single string

* modifying test to see if stops running for over two hours:

* docs: update adding command in usingOpenWPM

* Forgot to save

* Removed datadir

* Reverting error, updating function to current name

* Attempted fix treats display as object

* changing display; pytest unchanged

* added a test case to ensure xvfb runs

* simplifying test

* manual test breaking post-#807

* replacing with standard json function for single string

* modifying test to see if stops running for over two hours:

* Deleted redundant files and references to default_browser_params.json and default_manager_params.json (#822)

* Deleted redundant files and references to -
default_browser_params.json and default_manager_params.json

* added validate_crawl_configs to docs

* updated the docs on how to instantiate TaskManager

* Updated Using_OpenWPM.md

* Updated Platform-Architecture.md

* Attempted fix treats display as object

* changing display; pytest unchanged

* added a test case to ensure xvfb runs

* simplifying test

* fixing requested issues

* runs; modified test to include exception

* fix import

* Queue not optional; removed

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* updated test to check for lockfile

* Update test/test_xvfb_browser.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* sticky key in the last commit, same change

* Command refactoring (#750)

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* Ported SaveScreenshotFullPage #763

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove custom function command and format code

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove duplicate append_command

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* generate new xpi

* Fixing tests

* Fixing tests

* Fixing up more tests

* Removed type annotations

* Fixing tests

* Fixing tests

* Removed command_executor

* Moved Commands to commands

* Fixing imports

* Fixed skipped test

* Removed duplicate append_command

* docs: update adding command in usingOpenWPM

* Forgot to save

* Removed datadir

* Cleaning up imports

* Implemented simple command

* Added documentation to simple_command.py

* Renamed to custom_command.py

* Moved docs around

* Referencing BaseCommand.execute

* Update docs/Using_OpenWPM.md

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

Co-authored-by: Cyrus <cyruskarsan@gmail.com>
Co-authored-by: cyruskarsan <55566678+cyruskarsan@users.noreply.github.com>
Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

* Changed finally condition

* Restoring manual_test.py

Co-authored-by: Cyrus <cyruskarsan@gmail.com>
Co-authored-by: cyruskarsan <55566678+cyruskarsan@users.noreply.github.com>
Co-authored-by: Mollie Bakal <bakalm@umich.edu>
Co-authored-by: MollieBakal <molliebakal@gmail.com>
Co-authored-by: Ankush Dua <61025943+ankushduacodes@users.noreply.github.com>
Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>
2021-01-11 20:04:08 +01:00
Stefan Zabka 5c8d454611
Updated webdriver syntax (#841)
* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* Ported SaveScreenshotFullPage #763

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove custom function command and format code

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove duplicate append_command

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* generate new xpi

* Fixing tests

* Fixing tests

* Fixing up more tests

* Removed type annotations

* Fixing tests

* Fixing tests

* Removed command_executor

* Moved Commands to commands

* Fixing imports

* Fixed skipped test

* Removed duplicate append_command

* docs: update adding command in usingOpenWPM

* Forgot to save

* Removed datadir

* removed use of depricated methods

* Command refactoring (#750)

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* Ported SaveScreenshotFullPage #763

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove custom function command and format code

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove duplicate append_command

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* generate new xpi

* Fixing tests

* Fixing tests

* Fixing up more tests

* Removed type annotations

* Fixing tests

* Fixing tests

* Removed command_executor

* Moved Commands to commands

* Fixing imports

* Fixed skipped test

* Removed duplicate append_command

* docs: update adding command in usingOpenWPM

* Forgot to save

* Removed datadir

* Cleaning up imports

* Implemented simple command

* Added documentation to simple_command.py

* Renamed to custom_command.py

* Moved docs around

* Referencing BaseCommand.execute

* Update docs/Using_OpenWPM.md

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

Co-authored-by: Cyrus <cyruskarsan@gmail.com>
Co-authored-by: cyruskarsan <55566678+cyruskarsan@users.noreply.github.com>
Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

Co-authored-by: Cyrus <cyruskarsan@gmail.com>
Co-authored-by: cyruskarsan <55566678+cyruskarsan@users.noreply.github.com>
Co-authored-by: ankushduacodes <61025943+ankushduacodes@users.noreply.github.com>
Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>
2021-01-11 12:53:36 +01:00
Stefan Zabka e338bb29f0
Command refactoring (#750)
* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* Ported SaveScreenshotFullPage #763

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove custom function command and format code

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* remove duplicate append_command

* Refactored GetCommand, BrowseCommand to have execute method

* Fixed type name format issues in __issue_command

* Fixed everything I broke

* Changed import style so tests can run

* Added BrowseCommad to imports

* Added some more self

* Added logging to explain failing test

* Added one more self

* Ported SaveScreenshotCommand

It now uses the new command.execute(...) syntax

* Ported SaveScreenshotFullPage #763

* Ported DumpPageSource and RecursiveDumpPageSource (#767)

* Command refactoring (#770)

* attempt at refactoring save_screenshot

* fixed indentation, attempt at refactoring save_screenshot

* refactored SaveScreenshot command to have execute method

* reformatted code using black

* refactored savefullscreenshot command to follow command sequence

* formatted files with black

* removed extraneous commands

* refactored dump page source and formatted code with black

* reformatted recursive dump page source command and formatted code w black

* formatted files using isort

* formatted all files with isort

* refactor finalize command

* refactored initalize command and formatted with black and isort

* missed a conflict

* Ran isort

* Added append_command

* generate new xpi

* Fixing tests

* Fixing tests

* Fixing up more tests

* Removed type annotations

* Fixing tests

* Fixing tests

* Removed command_executor

* Moved Commands to commands

* Fixing imports

* Fixed skipped test

* Removed duplicate append_command

* docs: update adding command in usingOpenWPM

* Forgot to save

* Removed datadir

* Cleaning up imports

* Implemented simple command

* Added documentation to simple_command.py

* Renamed to custom_command.py

* Moved docs around

* Referencing BaseCommand.execute

* Update docs/Using_OpenWPM.md

Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>

Co-authored-by: Cyrus <cyruskarsan@gmail.com>
Co-authored-by: cyruskarsan <55566678+cyruskarsan@users.noreply.github.com>
Co-authored-by: Steven Englehardt <senglehardt@mozilla.com>
2021-01-09 11:15:01 +01:00
dependabot[bot] fc7c772986
Bump ini from 1.3.5 to 1.3.8 (#827)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-14 12:03:40 +01:00
dependabot[bot] 2064b9119d
Bump ini from 1.3.5 to 1.3.8 in /openwpm/Extension/firefox (#829)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-14 12:03:26 +01:00
dependabot[bot] 58b0ff8092
Bump ini in /openwpm/Extension/webext-instrumentation (#828)
Bumps [ini](https://github.com/isaacs/ini) from 1.3.5 to 1.3.8.
- [Release notes](https://github.com/isaacs/ini/releases)
- [Commits](https://github.com/isaacs/ini/compare/v1.3.5...v1.3.8)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-14 12:03:16 +01:00
Ankush Dua 2d6cfb26f2
Deleted redundant files and references to default_browser_params.json and default_manager_params.json (#822)
* Deleted redundant files and references to -
default_browser_params.json and default_manager_params.json

* added validate_crawl_configs to docs

* updated the docs on how to instantiate TaskManager

* Updated Using_OpenWPM.md

* Updated Platform-Architecture.md
2020-12-09 20:32:37 +01:00
MollieBakal 4d7db91a12
Fixing import in manual_test.py broken after #807 (#817)
* manual test breaking post-#807

* replacing with standard json function for single string

* Reverting error, updating function to current name
2020-12-07 15:57:32 +01:00
dependabot[bot] 30fc138427
Bump highlight.js in /openwpm/Extension/webext-instrumentation (#821)
Bumps [highlight.js](https://github.com/highlightjs/highlight.js) from 10.3.2 to 10.4.1.
- [Release notes](https://github.com/highlightjs/highlight.js/releases)
- [Changelog](https://github.com/highlightjs/highlight.js/blob/master/CHANGES.md)
- [Commits](https://github.com/highlightjs/highlight.js/compare/10.3.2...10.4.1)

Signed-off-by: dependabot[bot] <support@github.com>

Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2020-12-07 15:56:46 +01:00
Ankush Dua db1186a9f6
Refactoring browser and manager params into dataclasses (#807)
* initial file commit

* add new dependency for dataclasses

* implemeted basic BrowserParams dataclass

* dependencies update

* file reformat

* implemented basic ManagerParams dataclass

* Update environment dependencies

* Added new error class to validate
 browser and manager params

* file reformat

* Update scripts/environment-unpinned.yaml

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* added validations for BrowserParams dataclass

* Update openwpm/config.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Removed unnecessary checks

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Changed error string formatting

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Changed filenamea and necessary imports to resolve conflicts with new master branch(refering to PEP-8 reformatting)

* Revert "Changed filenamea and necessary imports to resolve conflicts with new master branch(refering to PEP-8 reformatting)"

This reverts commit e550c3bd60.

* Revert "Merge branch 'master' into turn_browser_and_manager_params_into_dataclasses"

This reverts commit aff5a384e7, reversing
changes made to 6ecaf5d0a9.

* Revert "Update environment dependencies"

This reverts commit 385825b10a.

* Revert "Merge branch 'turn_browser_and_manager_params_into_dataclasses' of https://github.com/ankushduacodes/OpenWPM into turn_browser_and_manager_params_into_dataclasses"

This reverts commit 6ecaf5d0a9, reversing
changes made to e550c3bd60.

* file reformat

* finalized validate_browser_params function

* fixed typo in error string

* added validations for manager_params

* Explanation for using list for supported browser

* Revert "Revert "Merge branch 'master' into turn_browser_and_manager_params_into_dataclasses""

This reverts commit 6c3e98e57b.

* Revert "Revert "Changed filenamea and necessary imports to resolve conflicts with new master branch(refering to PEP-8 reformatting)""

This reverts commit fc8f48f187.

* import name change from .Error to .error

* moved call_instrument check to config.py

* fixed accidental use of dict syntax in a class

* moved save_content check from deploy_firefox.py

* deleting redundent file

* deleted more redundent files

* removed redundant imports

* added new save_content check

* property name changevariables can not have '-'

* added new attribute  to ManagerParams

* adapted files to validate manager & broswer params

- also added logic to convert the objects(BrowserParams and ManagerParams) to dictionaries to not break the functionality
- also updated demo.py to work with new file names on this branch

* removed obsolete documentaion

* Dependency Update

* Revert "Dependency Update"

This reverts commit 8ee3a02b17.

* Dependencies Update

* unset memory and process watchdogs

* add new output_format and failure_limit checks

* inheriting dataclasses and added type hints to fn

* added todo

* fixed inheritance of dataclasses acc. to plan

* refactor use of dict to use dataclasses(pending)

* more refactoring use of dict to dataclasses -
Also changed some type hints related to new refactoring

* fixed screenshot directory issue -
because of which some of the tests were failing

* added try-except clause for unexpected errors

* added tests to cover dataclasses

* added some new and edited some old docs

* refactor use of __dict__ to dataclass.to_dict()

* Revert "refactor use of __dict__ to dataclass.to_dict()"

This reverts commit a4f35513fa.

* fixed some tests

* refactor use of __dict__ in favor of
dataclass.to_dict() method

* removed some TODOS

* fixed dataclases validation tests

* Update docs/Configuration.md

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update docs/Configuration.md

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update docs/Configuration.md

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update openwpm/config.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update openwpm/config.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Update openwpm/task_manager.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* minor fixed wrt polishing the PR

* added new check and test for crawl configs

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
2020-12-02 10:10:45 +01:00
Ankush Dua 9794b30bb7
Fixed nodejs version typo (#815) 2020-11-30 18:07:08 +01:00
Ankush Dua d0c3466250
Resolving imports to avoid errors (#811)
* fixing attribute error

* import fixes
2020-11-25 20:33:56 +01:00
Fukurou Makoto 051a3846cb
Module & Imports conformed to PEP8 (#806)
* Module & Imports conformed to PEP8

* Conformed tests to PEP8

* Conformed tests to PEP8 (2)

* Updated webdriver test for PEP8

* Updated test_timer for PEP8

* Deleting Workspace file

* renamed files to match PEP8

* Update docs/Using_OpenWPM.md

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* Changed serversocket to ServerSocket

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
2020-11-24 17:34:04 +01:00
Nisan Abeywickrama d74dcf75d7
Updated stored commands in test_webdriver_utils.py (#804) 2020-11-19 17:14:40 +01:00
Nisan Abeywickrama 01f3993285
Removed unneccessary List unpacking (#803)
* Fixes #800, Removed unneccessary List unpacking

* Removed unneccesary comments
2020-11-19 15:14:23 +01:00
Stefan Zabka 53e4516930
V0.13.0 release (#798)
* Preparing v0.13.0 release

* Made links work

* Rebuild extension

* Fixed extension build script

* Removed prepare step as it breaks fresh installs

* Changed openwpm import in tests to absolute

* Fixed test_timer.py

* Reverted changes to webext-instrumentation/package.json

* Pinning to node<15.0.0

* Rebuilding package-lock.json

* Fixed test

* Also mentioned LordReigns

* Fixed links to CONTRIBUTING.md

* Moved to FF83
2020-11-19 14:24:06 +01:00
Nisan Abeywickrama 4b7a17a586
Moved CONTRIBUTING.md from docs to top level directory (#801) 2020-11-18 16:05:51 +01:00
Ankush Dua 43d6b45da1
Adding performance timer to see how much time a command took (#799)
* Added new duration column to crawl_history table

* adding timer to populate new duration column

* replaced .time() with .time_ns() to store duration
in nanoseconds

* Update Schema-Documenation with new duration col.

* documenting unit of duration being stored

* Update automation/TaskManager.py

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>

* reformat file in accordance with pre-commit config

* add test -
to assert that new column for command duration is storing valid values

* making the test run locally without internet

Co-authored-by: Stefan Zabka <zabkaste@informatik.hu-berlin.de>
2020-11-18 15:14:59 +01:00
Stefan Zabka 512018f852
Updated all JS/TS dependencies (#794)
* Updated all JS/TS dependencies

* Removed xbl as ResourceType
2020-11-16 11:38:03 -05:00
Ankush Dua 502cd830ad
Renaming automation module to openwpm (#793) 2020-11-14 16:06:51 +01:00
Ankush Dua 2a971d0323
Moved process_watchdog and memory_watchdog into manager_params(#787)
fixes #749
Co-authored-by: vringar <szabka@mozilla.com>
2020-11-13 15:58:29 +01:00
ankushduacodes 65337e0c19
Making memory_watchdog not run by default (#785)
Closes #778
2020-11-10 15:53:54 +01:00
Stefan Zabka 93ddf80c18
Fixed typo in Platform-Architecture.md 2020-11-04 19:19:36 +01:00
ankushduacodes decabbf8bb
Removed browser_settings(#775)
Closes #745
2020-11-04 19:17:17 +01:00
7brokenmirrors 3135003151
Fixed mount instructions for OpenWPM in Docker (#776)
Somehow ~ now expands to /opt/
2020-11-04 17:25:29 +01:00
Stefan Zabka e989ce5f74
Moved the wiki into the repo (#716)
And updated some stuff along the way
2020-10-29 19:17:41 +01:00