User emulation - Browser automation - selenium

I have a website where users should every day perform the following tasks:
Log in with user/password
Select from a filter the date of the day
Click on a link that will let them download a csv file that they will import in a database.
Of course I can't change the website, but I would like to automate this.
I'm testing Selenium, but I should set up a complete environment to create a scalable import process where I can launch several process together.
My idea is to setup a server that will:
emulate a browser
log in into this website
perform the actions, including select, click and wait instructions
save the csv stream into a file
import into a sql sb
What would be a good framework or service to start?
Thanks for your time

This should be a good place to read.

Related

Automating web page population

I have data in a csv file & want to do the following with it:
Log into web site
Populate field of the page with the csv data
Navigate to next page
Input the rest of data
Click submit
Repeat for next line
I can do this using UiPath but it's an expensive option for a relatively simple use case.
Any one any suggestions on how do this using a different method?
Thanks,
EddieT
If you're looking for alternatives then you probably would want to investigate APIs or Webhooks. But that all depends on the access rights you have for that particular website.
Try messaging the Developers of the website you need as they might have this service already available.
UiPath may appear expensive but if you calculate the amount of time saved for this one process then you will see the money savings too.
If you can find a couple of other processes you want to automate then I'd highly recommend it.

Test Automation - Katalon - upload file when it's scanned for viruses

I was trying to upload a file from my local to the web page. I’m able to select the file using the Robot class, but I’m stuck on a part. When it uploads the file, I see a message in UI that the file is in “scanning for viruses”. But, it doesn’t complete. And I can’t move forward because the file upload is not complete as it’s still being scanned for viruses. (Screenshot attached)
However, in my application, when I open a session manually and upload a file manually, it’s being scanned for say max 2-3 seconds and after that, I see the upload is complete. Only, when the session is opened by Katalon, I’m not able to complete the upload as it gets stuck on scanning.
Can you please help me figure out why would it behave differently when done from an automated script as compared to a manual execution? Is it something related to browser settings when Katalon opens it? And how to handle this part in an automated script?
Please have a look at this. Looking forward to a reply.
enter image description here

How to easily 'interval' login a website and check its content whether has changed?

This is a bit high-level solution based question: I have a website, and what I need to do is login->navigate->click category->check whether the specific content has come; every 10 mins.
There are quite a few third-party services, but they only checking the website uptime, which is not what I need.
Currently, I am thinking of silly way: create a selenium UI test, and run it every 10 mins, which seems pretty complex.
Feels like need some tool, so that I can run some extra js on a particular web to test my functionality. Any good solution for this? even some js framework, or even third-party payable service that I can direct make use of?
Thanks.
The best way to do this is :
Create a selenium test - Single main method that does all the steps.
Export it as a runnable jar
Schedule the .jar execution using windows scheduler.
Before scheduling the jar, once just double click the .jar file and see if the steps run smoothly.
Alternately you can try using vbscript (.vbs) file also.

Multiple login tests on mobile app with UFT

I am trying to test the Login feature of my Android app with multiple user-password entries that I have in an Excel. I have already been able to import that data from the Excel successfully and run the same test with each row (with "Run on all Rows" option), but now I am facing a problem that I am not being able to solve.
After a test runs with one row, one the test starts over with a new row, it will not restart the app, but start at the same point where the previous one finished. I think this is not the expected behaviour, in general, since most of the GUI testing tools restart the app when testing a feature with parametrization (data from Excel, mostly). Anyway, I "fixed" this by logging out in my app.
In this case there was an "easy solution" by logging out. But what if I was testing a different feature in which I cannot simply "log out". The problem is that in those different cases I would have to navigate back or do something that may fail and has nothing to do with the feature I am testing.
I am not sure if I am not using the right approach. Is there a good general solution for this issue?
I would suggest the following two ways to solve your problem if you cannot simply use logout as the last step.
Use App.Launch function you can add one line to the top of your script like Device("iPhone 7").App("myApp").Launch NotInstall, Restart . Here the device and the app can be TO in object repository or identified using descriptive programing like Device("id:=123456")
Check options in Test Settings Please check the latest UFT version maybe 12.53 or later if there are any options in Test Settings for users to choose to restart or reinstall app for iterations.
Thanks

Loadrunner file upload

I have Google'd this subject a lot over the past few days, but I cannot find a best practice solution. My question is basically how do I script in LR a fileupload? My app consists of a browse button, a pop up that lets me locate the file and it closes after I have located the file. Finally the app has a upload button to upload the file.
My script is recorded using URL mode and I guess I need to create some kind of custom request? URL mode creates somewhat complex scripts and placing custom requests inside these script is challenging.
BTW: I have not tried to record and play back the file upload process described yet, and using URL mode might just solve it without further customization? Or did someone actually made file upload using LR and URL mode work? A small example would be greatly appreciated!
Different applications will go about uploading a file from a client to a server in different ways. Your best bet is to record your application doing the upload and taking a look at what LoadRunner records.
Mark the point before and after the upload as you record by creating a transaction so you can easily find the spot in your code where the upload actually happens.