I need to create c# code to go to site, fill in form submit record.
I have tried using seleniumhq but this creates tests..I need more of a script i can run once to help me register some users for my site
any ideas??
You can create c# code that posts data to the form page for the site that you are trying to register the people for. Otherwise depending on the browser you could use something like iMacros to automate the form filling. The other answers are also correct. Unless it is a site you control none of these methods will work if the site uses captcha or other methods to prevent automatic form filling.
Edit: Something like http://geekswithblogs.net/rakker/archive/2006/04/21/76044.aspx would be a good start.
If you are trying to automate mouse clicks and keyboard strokes, you can try AutoIt.
i would use an HttpWebRequest Object to submit the form, a quick google found this:
http://netomatix.com/HttpPostData.aspx
http://watin.sourceforge.net
Related
I'm trying to show an alert with an entry inside it, as I can see it in a lot of apps, but I could'n t find a solution for now (neither custom renders)
Any suggestions?
You can use UserDialogs libary
After initialization simply use:
UserDialogs.Instance.Alert("message")
You can do that in multiple ways. Lets say if you have your own UI and the Entry field. Then you can create the Popup Page and Display that Popup Page whenever necessary for the User Input. If you want to use Popup Page (best - only if you have requirements to have your own style of prompt):
https://github.com/rotorgames/Rg.Plugins.Popup
If you have very simple requirement of only Showing the Entry Field the use :
https://github.com/aritchie/userdialogs
Since this is very common question and have all the resources online. Please go through the websites above have all the examples you can look into. Please let me know if you still need any more help.
In my company I have a ASP.NET web page where there is a ChangePasswordControl and a RecoveryPassword control. The problem now is that, when user filling out the data hits enter key on the keyboard he get's logged out instead of validating the user.
Normally I've used a Panel control and setup the default button there and this helped. But here the change password button is built in and there is no way to get the ID of it (or is it?). I generally started my web apps adventure with ASP.NET MVC so I do not know much about the ASP.NET Controls.
Could anyone help me? I've read somewhere on the net that I should do my own template?
But I don't know if it's the right approach, and I don't know how to do this templates and what's the idea behind this concept. I'm wondering if I should use some jQuery or Javascript to handle that, but maybe there is a simpler way to do that.
Thanks in advance.
Have a look at the solution outlined here
Does anyone know the name of the property in which it look alike button
but once if we keep the mouse pointer
on it then it will show like dropdown
list options.
I want to use that in my asp.net
project.
There is no out of the box control as such. It is an effect achieved either using javascript or CSS
Take a look at this example
http://demos.9lessons.info/DropMenu/MyDemo.html
You should also search for jquery plugins for this. Though you will get readymade code for it but it will surely not be a server side control. You have choice of either creating a user control or just use it as it is.
unfortunately there is no such control out of the box in asp.net. you might want to look at third party controls or do some css magic.
Something like that maybe a standart one(1) .But I can recommend you to use telerik if you are using it already here is a example (2)
Example2
Example2
I am developing a winform app which is controlling a website. On click of a button in winform app i want to fill a form, click the submit button on the web page upon which a new page will open , on that page i have to click on a link.
How to achieve this. i have tried many things but did not got any proper solution
If you're looking for a web automation tool, use Watin. It allows you to automate via code the opening of a browser, the clicking of buttons, and the fillout of form fields. However, that is more of a testing library.
Honestly though, your choice of solution sounds odd. You're trying to get a client application to make requests through a web page, instead of directly requesting whatever resource yourself from the client application. It's hard to give you a direct solution without a good understanding of the problem space.
Today i tried to write a program which checks some checkboxes for me on a webpage and then clicks on a button.
For this purpose i tried to use the webbrowser, but how can I set the state of a checkbox there? Searching the internet for hours but no luck only managed to navigate to the webpage with the checkboxes.
One approach would be to write a Bookmarklet, where you create a bookmark that runs JavaScript code, and the other would be to avoid the web browser altogether and instead just send a request directly to the web server that looks like it would if you had checked the checkboxes and clicked the button. Using a tool like wget or curl can make the latter option pretty easy.
Here's a sample URL that you could use to go for the Bookmarklet approach:
javascript:document.getElementById('theCheckBox').setAttribute('checked', 'checked');document.getElementById('theForm').submit();
The easiest way to do the second approach would be to use a tool like Firebug or Fiddler to monitor what a request looks like when you manually submit a page with your checkboxes checked and then construct similar requests through curl.
Using a WebBrowser control is not really a good approach here. The purpose of this control is to display a webpage, not to automate user interaction with it.
The most easy and most reliable solution is to use HttpWebRequest to directly talk to the server, sending a (most likely) POST request.