Skip to content

Updates for ChartMaker, Traffic-generator, refactoring, and more #840

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 11 commits into from
Mar 15, 2021

Conversation

mdmintz
Copy link
Member

@mdmintz mdmintz commented Mar 15, 2021

Updates for ChartMaker, Traffic-generator, refactoring, and more

  • Updates for ChartMaker:
    -- Add parameters for enabling/disabling labels & legends on charts.
    -- Improve some layout and design details for chart generation.
  • Updates for Traffic-generator methods:
    -- Add parameters to traffic-gen code for lowering the bounce-rate.
    ---- (Lets you perform a click action as part of traffic-gen methods.)
  • Make sure that generated presentations include a progress bar.
    -- (This was probably already the default option if not changed.)
  • Refactoring:
    -- Move coverage and flake dependencies into own setup.py area.
    ---- (Install coverage tools with: pip install -e .[coverage])
    ---- (Install flake tools with: pip install -e .[flake])
  • Update required and optional Python dependencies:
    -- setuptools>=54.1.2;python_version>="3.6"
    -- prompt-toolkit==3.0.17;python_version>="3.6"
    -- flake8==3.9.0;python_version>="3.5"
    -- pyflakes==2.3.0;python_version>="3.5"
    -- pycodestyle==2.7.0;python_version>="3.5"

SeleniumBase ChartMaker lets you use Python to generate HTML charts from HighCharts JS.


Here's an example: https://github.com/seleniumbase/SeleniumBase/blob/master/examples/chart_maker/chart_presentation.py


SeleniumBase Traffic-generator methods let you generate traffic to a website for testing analytics software that monitors referral sources.

This works by using JavaScript to create a button on a website, which is then clicked in order to take you to a destination page. Website analytics software is easily fooled and believes this traffic to be a genuine referral from the origin website.

self.generate_referral(start_page, destination_page, selector=None)

self.generate_traffic(start_page, destination_page, loops=1, selector=None)

self.generate_referral_chain(pages)

self.generate_traffic_chain(pages, loops=1)

If a selector is provided in the self.generate_referral and self.generate_traffic methods, then the automation will click that button after reaching the destination site. This can prevent an artificial rise in website bounce-rate because the new user performs an action (and therefore doesn't count as a bounce anymore because the user visits a different page of that destination website).

@mdmintz mdmintz merged commit 9238509 into master Mar 15, 2021
@mdmintz mdmintz deleted the charts-pies-traffic-and-refactoring branch March 15, 2021 00:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant