I am using selenium with Python.
I recorder the test case and able to run it properly.
Now the web page I am using is connect with oracle server and some details thae need to be provide in Web page is required to fetch from oracle DB.
So can you please help that how to fetch data from oracle and fill the web page details automatically in selenium
Thanks in advance.
You will need to ask the people who wrote the application how you can connect to the Oracle database. They can provide you with the database schema, the connection URL with user name and password.
After that, you need to add the Oracle driver to your Selenium project and create helper classes to fetch data from the database. Use those helper classes in your page object.
This page contains links to Python drivers for Oracle.
Related
I have a registration form on a website and need to build a server on python which will receive this forms data and send to a database as a text. I have found information about it only through Flask. My question is can I do it with a native python and how can I do it.
You can't do that with native Python (unless you want to build your own web framework and database connector).
The most common web frameworks are Django and Flask. Pick one of them and start studying...
"how to direct to odoo homepage without /web/database/selector and login"
I have installed and used odoo15 on Ubuntu 20. I use it by installing multiple dbs on one odoo instance.
I used nginx and built one website each in one db.
To access the built website, the db select page is accessed first.
Is there a way to directly access the homepage without db select and login?
As shown below, each is set in the database, and nginx and ssl authentication are also applied.
Set the database name and domain name the same
db1.com -> https://db1.com
db21.com -> https://db2.com
db3.com -> https://db3.com
If regular visitors visit https://db1.com, how to set dbfilter so that they can go to https://db1.com without db select and login?
If not, is it impossible to configure a multi-domain homepage for odoo15?
Do I need to install multiple odoo15 for each domain on one server?
Any help would be greatly appreciated.
Best Regards.
Tldr: Is it feasible to create a web tool/app that relies on server side Selenium automation.
Created a local script that automates form filling for car insurance quote websites and returns the cost to insure. Ie fill one form and it auto fills every other providers quote form and returns quotes.
But now I want to extend that functionality to others via some sort of webapp [flask/Django?] that handles a clients requests server side by fetching that information and returning it to the client based on their inputs.
What I’m struggling with is Selenium is limited to 5 web drivers (locally) I believe, and is resource intensive, so to me that means at most you can handle 5 website requests at once?
The short answer is YES.
The idea to solve the problem is as follows:
Create a web app which can fetch user's inputs and return something back to user. Just like the most common website.
Create a service in the web app. The service can handle what you wanted using Selenium, such as, filling form of car insurance and getting the cost to insure.
Create a webpage or API in the web app. The webpage/API calls the service mentioned above. When user use the webpage/API, Selenium will automate to do something.
So, it's done.
I have a flask web application with many pages where users can insert some data stored in mysql using sqlalchemy. I would create another page with an interactive dashboard. I googled and I found superset that it seems perfect for my app. It's possible embed apache superset (or similar) into my web app? There are some tutorial?
It is possible to embed Apache Superset in any web application using iframe. Copy the URL of the dashboard that you want to embed and add ?standalone=true at the end. This URL can be used in the iframe to render the application.
Problem with the solution:
In the above mentioned method you will be seeing login page inside the iframe when you access the dashboard. You will have to login to the web application and then login to Superset.
Possible solutions
You can make the dashboard public as mentioned in the doc: https://superset.incubator.apache.org/security.html?highlight=public#public
Implement a custom authenticator as mentioned in the post: https://medium.com/#sairamkrish/apache-superset-custom-authentication-and-integrate-with-other-micro-services-8217956273c1
I would recommend the second approach as it would give protection to your data.
I'm trying to gain access to a database hosted at oraclecloud.com - is this possible? I.e. assuming I have the correct login credentials, is it possible to access the data from the database using cx_oracle when the database is hosted out of my reach? If so, does anyone have any sample code?
Thanks in advance,