sessionStorage in Safari 14.1.1 lost if I edit the URL to change route and don't open the Developer Tool - safari

Description:
After update Safari to version 14.1.1. The sessionStorage does not persist if navigate to any route in the same website by editting the URL in address bar.
Screen recording: https://www.youtube.com/watch?v=zvEclwHl8zY
Step to reproduce:
Open any website. Ex: https://google.com
Open Developer Tool, type “sessionStorage.setItem(‘test’, 10)” and Enter
Open Storage tab and check the above item has been added to Session Storage
Close Developer Tool
Edit the URL in the address bar and press enter. Ex: https://www.google.com/imghp
Open Developer Tool again and open Storage tab and check Session Storage Item with key “test”
Expected result:
Session Storage Item with key “test” exist and has value 10
Actual result:
Session Storage item with key “test” doesn’t exist
Note: The funny thing that everything work fine if i keep Developer Tool opened for the whole steps

Related

Python Selenium Safari

I don't understand how this works:
If I open a website by hand in for example Safari or Chrome, I can log me on and if I close the browser I automatically log in after reopen the browser. So I once log in in Instagram, the next time I don't have to do it again if I reopen the side.
But if I open it with selenium, it won't work like this. Is there a way to give options in selenium to fix this? I can't open a side without the side thinks iam a robot (what actually is right) but this sucks...
When you quit the webdriver, the cookies, cache, history, etc are deleted. So if you want to be already logged in when you start the webdriver, you have to use the cookies from a profile on the normal browser in which you are already logged in. To do so you have to:
create a new chrome profile on the normal browser
login to instagram
load the profile in selenium
In this way when you start the webdriver and run driver.get('https://www.instagram.com/') you will be already logged in.
To create a new profile, open your chrome browser, click on the profile icon on top right, then click "Add" and then click "Continue without an account".
Then write a name for your profile and be sure check the box "Create a desktop shortcut". I suggest you to choose a color so that you will immediately see if it works when selenium open the browser window.
Open chrome from the new desktop icon (mine is called "PythonSelenium - Chrome.exe") and login to instagram.
After you logged in, close the browser and open the properties of the new desktop shortcut. Take note of the name of the profile directory, which in my case is "Profile 3".
Now we have to tell selenium to open the chrome driver using this new profile we've just created, which is logged in twitch. To do this we need the path of the folder where the profile is stored. By default the path is something like C:\Users\your_username\AppData\Local\Google\Chrome\User Data, if you are not sure about it check where chrome is installed in your computer.
Then run this code (remember to substitute Profile 3 with the name of your profile from step 3)
from selenium import webdriver
from selenium.webdriver.chrome.service import Service
options = webdriver.ChromeOptions()
options.add_argument("user-data-dir=C:\\Users\\your_username\\AppData\\Local\\Google\\Chrome\\User Data")
options.add_argument("profile-directory=Profile 3") # <-- substitute Profile 3 with your profile name
chromedriver_path = '...'
driver = webdriver.Chrome(options=options, service=Service(chromedriver_path))
driver.get('http://twitch.tv/login') # it should redirect you to the homepage
And this is the result:

How can I make Safari not use a cached version of a page?

In Safari 13.1 on MacOS 10.15.4, I have a page cache that seemingly can't be cleared.
I'm working on a site, served at localhost. When I load the page, I can see in my server logs that Safari requests the page, but it ignores the response and displays an outdated version of the page.
If I close the web inspector, the current version of the page loads, as expected. If I re-open the web inspector, the cached version loads.
I've tried:
Normal page refreshes
Going into the Network tab of the web inspector and toggling the "Use the resource cache when loading resources" button
Clicking the "reload" button in the inspector
Pressing "option + command + r" as that button's tool tip suggests, which is supposed to "reload page ignoring cache"
Develop -> Empty Caches
Quitting Safari and opening it again
Nothing helps.
In the Network tab of inspector, the request for the main page shows "(inspector override)" in the "Transfer Size" column, which seems to confirm that it's using some kind of cache.
How can I get Safari not to use a cache for this page when the web inspector is open?
Get Rid of the "Local Override"
The message "(inspector override)" in the "Transfer Size" column of the web inspector's Network tab indicates that a local override is set.
Also, I hadn't noticed that the page's icon was inverted in the Network tab, as that page says.
Without override:
With overide:
When a local override is set,
[Web inspector will] intercept the network activity and replace it with a local override, allowing for quick local testing without having to modify anything on a server.
When Web Inspector is open, network requests made by the inspected page that match the URL of a local override will instead use the the response content and MIME type, response status, and response headers from Web Inspector, rather than from the network or memory/disk cache.
https://webkit.org/web-inspector/local-overrides/
In my case, I did not know about this feature (which is actually pretty cool!) and apparently had created an override by accident.
To remove a local override, go into the Sources tab of the web inspector, find the "Local Overrides" section on the left, and either uncheck the local override for the page in question or right click it and select "Delete Local Override".

How to detect download dialogue in internet explorer 9+ using VBA?

I need to authenticate to a website.
After successful authentication - a form is shown, where a few details are filled.
After submitting the form, the page gives an impression that something is loading:
After a non-fixed delay, a download pop up is shown:
Sadly, assuming if I try to download from URL, I cannot overcome the authentication part. The web browser client is authenticated, not the VBA client.
My simple question is:
How to detect, whether this download pop up has appeared or not in IE9+?
A few things I have tried:
URLDownloadToFile is of no use, since the download link for the file is not fixed and appears after authentication
Siddharth's answer, does not addresses IE 9 download dialogue box, rather works for IE 8 dialogue box
I believe that after successfully detecting this pop up, I can download the file to local disk simply using SendKeys - correct me if needed.
Side question: how to download the file to local disk after detection is successful?

Clear session cookies in ie11?

in previous versions of IE the F12 dev tools had several option for cache and cookie management, but in the new IE 11 version (on the network tab) the option to clear / delete session cookies seems to be missing, does anyone know where to find it, (or how to accomplish this)
ps- no, "close IE and restart" is not a solution
There's a Clear Cookies for Domain button at the top center of the Network tab in the remodeled F12 tools.
To clear ALL session cookies, in the address bar, type:
javascript:document.execCommand("ClearAuthenticationCache")
and hit enter. Note that you must type this command yourself; if you copy/paste it, IE will delete the javascript: at the front of the string for security reasons.
Press F12 to open Developer Tools, go to Console tab, enter this Javascript command
document.execCommand("ClearAuthenticationCache")
I tried and saw that typing in address bar won't work.

How Do I Change Firefox Homepage In VB Code

How Do I Change Firefox Homepage In VB2011 Code
I want to change the url homepage of the firefox browser by running that EXE file
is this possible
If you want to change the Firefox's home page form a program running on the user's computer, you have to edit the prefs.js file and create a new line like user_pref("browser.startup.homepage", "http://www.example.com/");.
Beware that if there are multiple browser.startup.homepage entries every entry will be opened in a new tab when the browser starts up, and that the modification must be done when Firefox is closed, otherwise the changes will be lost.