question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Optional Unique Domain Tracking

See original GitHub issue

It would be nice to have the option to get a list of all domains visited during testing. By having this feature in the Selenium2Library we could make keywords like Delete All Cookies more useful. Currently Delete All Cookies will only remove cookies from the current domain. It would be much more useful if we could delete all the cookies from any domain visited during testing. This would allow for easier browser cleanup in between tests and reduce the need to restart the browser during testing.

Here’s how you would use domain tracking in your testing: Library Selenium2Library domain_tracking=${true} (domain_tracking will default to False)

I currently have a working implementation of this feature. Some things that I am unsure of is if storing the domains in a set is too specific. Should we just store all URL’s visited in a list during testing instead? I am currently parsing the URL’s into domains and adding them to a set. This means that you would only get unique domains visited during testing. This seems more useful for deleting cookies, but I could see use cases for wanting all of the URLS visited. Perhaps we could add both or leave the unique domains up to the person using the library?

I can put a PR up if this feature seems like something that people would be interested in, I just have a little touching up to do.

Current Keyword Ideas: Get Domains Visited: Returns a set of domains visited during testing.

Clear Domains Visited: Clears all domains visited during testing.

Delete All Cookies Across All Domains: Navigates to all domains visited during testing and deletes the cookies. (Perhaps we could expand the current Delete All Cookies keyword to do this.)

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:8 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
aaltatcommented, Jun 15, 2017

I haven’t found a need for this type of feature, but it doesn’t not mean that it could not be useful. At least I can recall someone else wanting this type of feature. Let me try to rephrase the problem you are trying to solve.

The Delete All Cookies deletes cookies only from the current domain where the browser currently is. If I recall this is a browser security feature and does not depend on the selenium, am I right? Now you want to track all the domains where browser has visited and delete cookies from sites where the browser has visited. Did I get it right?

Now do you want to track all the domains:

  1. Where the browser navigates by Open Browser and Go To keywords?
  2. Do you want to keep track the domains where the browser is redirected?
  3. Do you want to keep track of the domains which load third party content to the pages?

It seems that you have a PoC in your hands, would it be possible to see the code?

0reactions
aaltatcommented, Jul 31, 2017

Are you planning to continue on this track or can we close the issue?

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to set up cross-domain tracking in Google Analytics
With cross-domain tracking, you can see a user in a single Google Analytics account throughout their journey across multiple domains you ...
Read more >
Google Analytics Cross Domain tracking with Google Tag ...
A comprehensive guide to Google Analytics Cross-domain tracking and how to configure it with the help of Google Tag Manager.
Read more >
The Ultimate Guide to Cross-Domain Tracking
1. When we're talking about different domains in Google Analytics (GA), it’s often the case that each website will be set up as...
Read more >
Cross Domain Tracking in GA4 (Google Analytics 4) Setup ...
Cross-domain tracking allows you to uniquely identify a user across multiple domains. In this article, I am going to talk about how to...
Read more >
Domain tracking options
Track using custom subdomain ... This option is available when click tracking is enabled. A custom subdomain allows you to use your own...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found