Automating the software for some testing

I have installed erpnext locally and used it with the localhost URL. I want to automate the software using selenium. But due to security, the software asks for login again and again. Is there any way to access the software without actually logging in as an administrator?

login via selenium as start of the test?

security setting so that the session is long enough?

yes, I am logging via selenium at the start.
The session limit is also long enough

When I log in via selenium the driver.currentURL is still stuck on the login page whereas in the frontend I am directed to the homepage. And I am unable to figure out how to proceed.

ALso is there a way such that it did not at all ask for login credentials when we navigate to any link.

If you’re automating some process you’re better off using FrappeClient (REST API) or python interface.

If you’re writing a test suite then just follow what Frappe’s Cypress test suite does for automating login: frappe/cypress/support at develop · frappe/frappe · GitHub

I want to fill the tables like staffing plan with random validated data using the frontend forms.
Is there a better way to do this?

There may be a way to access the software without actually logging in as an administrator, but it is not recommended. If you are trying to automate the software using selenium, it is best to log in as an administrator to have full access to the software and its features. I had the same issue while trying to automate my ERPNext installation. My cousin is working for, and he finally suggested a workaround that worked for me. Basically, what you need to do is create a new user account with administrator privileges. Then, log in to the software using that account. Once logged in, you should be able to access the software without having to log in again. I hope this helps!