how to write autotests on selenide when building a website dynamically - java

I am trying to write an autotest for authorization in e-mail, but due to the fact that the login window is built dynamically, it does not come out to take the path to the text field for text input. I will be glad of any help. Thanks!
I tried all possible ways to it, but none of them worked

Related

Unable to access certain URLs with Selenium Java

I am in the process of writing a program whose purpose is centered around generating custom URLs for intelius.com and then extracting data from them with selenium. I have observed interesting behavior that I am unsure how to address.
My program creates URLs after the following pattern: https://intelius.com/people-search/LASTNAME/CITY-STATE, but I have found that attempting to access these constructed links consistently leads to a timeout error.
For example, http://intelius.com/people-search/Williams/Brooklyn-NY does not load the expected results page
Digging around in the website's source, I have found what appears to be a link validator script — what exactly that means, I do not know — and am unsure how to proceed.
How exactly would I go about authenticating my queries, without programming selenium to manually input the data into the search textbox and to press the submit button? Is my link-construction approach flawed in some blatantly obvious manner? I am a bit lost and would appreciate some direction. Thanks!
I think your problem is using http instead of https, and omitting www from URL. So this works:
https://www.intelius.com/people-search/Williams/Brooklyn-NY
The problem lies in the way the URL being formed. You need to construct and pass the arguments the way the web application understands it. The following works -
https://www.intelius.com/people-search/William-Brooklyn/NY

Creating a visual user interface to receive text input using java?

I have worked with Java in the past but have never created a visual user interface, only programs that read from the command line. I would like to create an interface that displays a box with text stating the required input on the left and on the right a blank text field that can be read from by the program. This is for a web app I am working on at my internship, I have very little guidance and would really appreciate any help as I am completely lost at this point. The program currently only reads line by line which is obviously unacceptable for a web app.
Thank you so much for any assistance you can offer.
You can use the browser as your user interface. Create an HTML file to create your form for the user to enter data (which they view in a browser like Google Chrome) and submit back to your app. JSP files are the java equivalent of HTML files with optional java code inside. Download the Eclipse IDE and the Tomcat server and run one of the tutorials for creating a web app. Here's a link to start: https://eclipse.org/webtools/community/tutorials/BuildJ2EEWebApp/BuildJ2EEWebApp.html

Access Form Fields in JNLP Launched Applictation

All,
I have been looking for this answer for several hours and I cannot seem to find a lot of great information.
I have been provided a URL to a JNLP file, which is opened via JavaWeb start.
When this application open, it has two fields. One for a username and one for a password. I can manually enter data into these fields and the application redirects me to where it should go.
My question is, is there any way to programatically access these fields for automation purposes?
There seems to be limited information on the subject.
Any assistance or pointers in the right direction are welcome.
Thank You

Program that enters form data in a web browser

I am trying to build a program that once a browser is opened and a login window (Let's say for Facebook) is presented, it will enter in my username and password for the site. I am familiar with the Robot class, and this could be used for the technique, however this is a messy solution. Could anyone suggest a way to go about this? Any good classes? Or is it better just to construct an add-on for a browser?
A plugin gives you direct access to a browser's API so it would be the best approach. That's how Roboform does it, you may want to take at look at what they did.

Launching a website from within a program, and inputting data to specific fields

Although I've been programming for a few years I've only really dabbled in the web side of things, it's been more application based for computers up until now. I was wondering, in java for example, what library defined function or self defined function I would use to have a program launch a web browser to a certain site? Also as an extension to this how could I have it find a certain field in the website like a search box for instance (if it wasnt the current target of the cursor) and then populate it with a string and submit it to the server? (maybe this is a kind of find by ID scenario?!)
Also, is there a way to control whethere this is visible or not to the user. What I mean is, if I want to do something as a background task whilst the user carries on using the program, I will want the program to be submitting data to a webpage without the whole visual side of things that would interrupt the user?
This may be basic but like I say, I've never tried my hand at it so perhaps if someone could just provide some rough code outlines I'd really appreciate it.
Many thanks
I think Selenium might be what you are looking for.
Selenium allows you to start a Web browser, launch it to a certain website and interact with it. Also, there is a Java API (and a lot of other languages, by the way) allowing you to control the launched browser from a Java application.
There are some tweaking to do, but you can also launch Selenium in background, using a headless Web browser.
as i understand it you want to submit data to a server via the excisting webinterface?
in that case you need to find out how the URL for the request is build and then make a http-call using the corresponding URL
i advice reading this if it involves a POST submit

Categories