serenity properties does not work for safari - selenium-webdriver

In my setup, I am running my tests for CucumberWithSerenity.class
The issue is after execution of my tests with safari browser, safari does not clear the cookies and other related data. e.g. After login steps are completed, i have to search for a user and set the user so i get relevant sections. But safari retains the set user information from previous test execution. To address this issue, i have set the following in serenity.properties file : safari.options.useCleanSession=true
however, this does not seem to work.
On other browsers, i do not have such an issue. Am i implementing the property incorrectly?
Are there other options in ensuring that every time safari browser is launched, i have fresh new session?
Can you please provide an example?

Related

Firefox private window flaky localStorage?

Some background - I'm currently working on a React/Typescript web-based project where we are relying on local storage to set up some fields that are later used by our authentication logic. These items should be set very early during the app start up via localStorage.setItem('item', value) and later accessed via localStorage.getItem('item')
We have observed a very strange issue specific to FireFox private mode where the items are never added to localStorage at the beginning of the app life cycle thus breaking some of our authentication logic. In addition, when we try to reproduce the breaking scenario but also observe localStorage via the storage tab in the Firefox debugger while going through the repro steps, the issue doesn't occur.
Is anyone aware of any issues with firefox localstorage that could cause this?
We have a workaround using cookies but would prefer not to have to add this fallback for every use of localStorage. In addition, this issue doesn't occur on Chrome or Edge
Firefox version - 75.0 (64-bit)

How can I instruc0t or configure bash or the desktop to open a Firefox Browser profile?

This problem happens in many ways. Today is the last straw. In my terminal window, when a program wants to open a URL, it starts-up a browser. It used to fire-up chrome instead of Firefox (the default browser). I uninstalled Chrome. (Yes I know, I was in a hurry that night).
So anyway I have two or more Firfox Profiles set-up on my Desktop. I took some 'time' to think about this beforehand.
I've named the profies with numbers:
10_self
10_wrk.remote
10_daughter
10_daughter
Well ... I just figured it out by chance. Firefox has a few configuration pages. One interesting page is:
about:profiles
Firefox opens the default profile when it is passed a URL to load. The name of the profile or short-cut have not effect. Even a profile named "default" is not selected as the default.
The default needs to be set in the about:profiles page.

"Error loading documents" in Firebase Database

I'm experiencing error when trying to access Database menu item within Firebase console.
It's a new Database with literally couple records of data but screen keep spinning for ages and then returns message "Error loading documents". In the same time I'm able to access Authentication menu item without any problem.
Note: I'm using MacBook Pro with Catalina 10.15.4 and Safari browser 13.1
It looks like it's a Firewall which is blocking my access to Database section within Firebase Console. Since I'm working on the corporate Mac I don't have control over it.
Workaround that works for me: use alternative private device ie. Mobile Phone.
Disabling the Add-Block fixed mine
For me, the problem was Safari. I was able to access the data programmatically but not via the web UI. Also, Safari worked well for the first few days I used it. I found that when I switched to Brave, I could see all my documents in the console.
On safari it doesn't work. I had to switch browser to Firefox!
Since last Firebase update it doesn't work on Safari anymore, don't know why I tried everything (Ad-block, firewall, ...). Even on mobile.
You have to use another browser to access your firestore docs...
April 16, 2021 : issue fixed, works again on Safari
I had the same problem and I was using windows Microsoft edge, I was using adblocker extension and I turned it off, but it didn't work. Then I opened the console on a chrome browser on a physical device and it worked!
I was trying to access the console in my work laptop with a vpn running in the background. Turn off that vpn and refresh console page. You should be able to see all your documents now.

Chrome browser doesn't show up when protractor starts testing

I'm wondering why my Chrome browser doesn't show when I start testing my angularjs app with protractor. It does execute the test though. I can see the output on my console.
However, if I change the value of browserName to point to firefox and rerun protractor, Firefox will fire up. I'll also see protractor doing its test on the browser.
I also had the impression that my Chrome was not showing up, but I just did not see it as I had too many open Chrome browser windows to even notice the one extra. The real reason I did not see it, was, that I was in full screen mode and the chrome window could not go to the forground as MacOS does not always allow this to happen.
For me I quit my usual Chrome session and then I saw that there was actually a new Chrome session appearing as I started the tests. (I know this is so obvious, but after a long day at work the most obvious things can sometimes lead to be puzzled. So this answer is for the ones who just happened have a bad day ;) )

Create a VFP Chrome or FireFox Object

We have a VFP application and need to open a specific site in Chrome or Firefox. The site is optimized for either of those browsers.
We know how to Createobject for InternetExplorer.Application to open a browser inside our application. This allows us to interract with the browser. However, it works only with IE.
Does anyone know how to accomplish the same purpose using either Chrome or Firefox?
We have done this to open the default browser (which is Chrome or Firefox).
oShell = Createobject("wscript.shell")
oShell.Run(lcUrl)
The issue with this approach is that it just opens the browser and we cannot interact with it (e.g. pass values and read items on the page).
At a minimum, if we can open Chrome or Firefox and pass POST parameters without using a querystring that would be an acceptable start.
Chrome doesn't expose an OLE Automation interface so I think you are out of luck with CreateObject(). You might be able to send keystrokes to it somehow but it would be kludgey at best.

Resources