I want to make a program that automate login a website then gets data from there with certain times without being called from me or anyone else like datatabese jobs.My problem is I don't know how to run this program from my domain with certain times.
I searched the web then I found selenium driver, some web scrapers and so. These are all working(can do what to do) that when I run the project from my computer via java or reach that files from my domain(PHP or whatever).
Briefly, how could I make a program that automate login(it's not important login stuff just must doing something without being touch its ok for me) .
Related
I want to write a browser automation script which can be used by others to perform their mundane tasks easily. For example, a script that will login to a site using provided credentials, select few products ( passed as parameter) and put them into the cart and checkout automatically.
I would like to keep the end-user installation easy and light. Don't want the end user (who is not tech-savy) to download and setup anything.
I had tried Selenium webdriver in Java for this. The script part works perfect for the requirement but asking the end user to install and set up JAVA, etc is not possible.
Would like to know if there is any simple way to achieve this. Preferably an open source solution, but not necessary. Goal is ease of setup and use for the end user.
Can anything similar be done for Android also?
We have developed selenium webdriver script with junit+java using eclipse on window 7. All the scripts are working as expected now we are using this script for load testing using Jmeter. However, while running script system open multiple browser (200) based on user thread and it create system to hang, is there any way to handle this or we can run script without opening browser. I have come across xvfb tool, but not able to get java api for this tool to plugin in eclipse.
We have also tried using HtmlUnitDriver but as it does not support javascript hence the test is getting failed, also we tried HtmlUnit and found same thing.
Note: that we have writen webdriver script to maintain display item of element (autocomplete, image) on screen.
It would be great if anyone can help or provide more inputs on this...
Firstly, do not integrate selenium scripts with JMeter for load testing! It's not a good approach to follow due to the obvious consequences that you have mentioned in your post. I followed a similar apporach in the beginning when I was new to JMeter and selenium but suffered a great deal when it came to running load tests that spawned too many browser instances which killed the OS.
You can go for HtmlUnitDriver or any headless browser testing tools out there with JMeter, but still, they will be running the browser internally in the memory. Moreover if your application is heavily using Javascript, it won't help.
So I would suggest that you record a browsing session with JMeter Proxy and modify the script (set of requests) according to your needs and play those requests alone, with number of threads.
From a higher level, you should be doing this:
Add a JMeter test plan, listeners, thread group and setup JMeter proxy and record a browsing session where you enter something into the autocomplete textbox and you get certain results.
Stop your proxy and take a look at all the requests that come under your thread group.
As far as I know, when it comes to autocomplete plugins, multiple
requests are sent everytime you enter a letter into the textbox. For
example, for the word 'stackoverflow':
Request1: q=s Request2: q=st Request3: q=sta and so on
Here you can simulate this effect by including words such that all
words have the same length which in turn will let you have same
number of requests to be sent to the server.
So in your test plan, you will pass one word per Jmeter thread. You
can pass the words to a request, from a csv file by using jmeter
parametrization.
This will be a much memory efficient way of load testing instead of using selenium with JMeter. I had asked a similar question. You can check out the responses.
I have been trying to figure out how i would go about letting multiple clients view the same Applet on Java. I have the code for the the server and the clients and i have a program that I would like them to view. However whenever i test the code I end up with the clients seeing the same program but different instances of it. I want them both to be able to see the same program and see when the other clients make action on the Applet and what not. It would just be for a local connection and I don't have any HTML files at this time.
I am currently building a java web app in netbeans. I have come to a point where I am stuck now. I have a draft application for a sports website I am building. The draft has the ability to have every user in the league access it, but I need it to be synchronized for all of them.
I want to run a java program or method that will create the draft at the specified date and time, then have centralized variables and a timer that each user can access when they access the web page.
So I want every user to see the same thing when they open the draft, regardless of what point in time they open it. Essentially this draft needs to run regardless of whether or not anyone actually opens it.
I am struggling with how I can do this, I was thinking threads, or a cron job, but I have no idea how to gain access to the program I run from my web app using something such as JSTL or jsp:useBean.
Any help at all would be much appreciated.
Since real-time consitency is important to your application.
One simple approach would be to store the draft information in database.
Set the sort order, start time and end time for all records in the database. Since you know this information before hand, you can do this from an admin script. Just run the admin script manually or at a preset time to update the database.
Now, clients can request the records that should be displayed given current time.
Added advantage with this procedure is that your client (JSP) can retrieve users in bunch with start time and end time and display them.
You don't have to make AJAX type of call every 20 seconds.
Just a quick question about a program I've been working on. I've made an applet that has several sounds that play depending on the users input that all work fine when I run it through Eclipse. The problem is when I have the code embedded into the HTML, one of the sounds that should run for about 2secs when user completes the game, instead cuts out almost immediately.
What might be causing this?