Navigating Through WebPage, Submit Form, Extract Files?
Mar 4, 2011I am trying to create a executable that on opens:
-Navigates to a webpage
-Fills in the login Form
-Submits the form
[code].....
I am trying to create a executable that on opens:
-Navigates to a webpage
-Fills in the login Form
-Submits the form
[code].....
I am developing an intranet site using VB.net 2005. I have a list of reports and their URL's located in a table. The list is displayed to the user using a Gridview control with select turned on. when the user selects one , the selected index changed event triggers looking up the URL from the table and stores it in a session variable. the problem i have is that i now need to open a new web browser window and display the page.
I tried using the envDTE.ItemOperations.Navigate but all of the information provided for this process is written in VB6 and VB2003. In 2005 the DTE proces is not native and when you assigned the ENVDTE.Itemoperatiosn to a shared variable (or any type) and
then try to navigate you get the following error: Object reference not set to an instance of an object.
so i tried to create an instance but when i try:
ItemOp = DTE.ItemOperations or
ItemOp = EnvDTE.ItemOperations
it gives me an error indicating that this is not possible. My quesion is, does anyone have the correct syntax for using the envDTE.ItemOperations.Navigate instruction from Visual Basic.Net 2005? None of the microsoft pages or microsoft books provide correct syntax. Or does anyone have any substitute code that can navigate a user from a protected sub in one page to a new web page?
I have a webbrowser and on a form I need it to fill text. The problem is, in order for the submit button to activate, you have to atleast type in 1 letter for it to update and make it send. The problem is when I do document.getElementById("p1").innerHTML= "SSSS" it works but it wont update the submit button to allow me to submit the form. What should I do?
View 2 RepliesI have custom web page and i can edit that there is 3 textboxes (username,pass,t)and a submit buttom.i want enter data in textboxes and submit them it give me result(its a 20 or 30 character)i want do them in my program and without a browser
View 5 Repliesauto filling data into webpages. I need to write a server side application mostly a console host app that makes some queries to the SQL Server database and gets a list of lets say students and their grades.There is a third party website that gets updated at the moment some peoples working and filling that data manually.
I need to write a program that will basically open that webpage, login if required, navigate to certain page, click on certain tab, fill the data and hit the submit button. I don't think this part is that hard but the trouble comes with a client side dialog box. At the moment there is a client side dialogbox that shows up when you hit the submit button confirming the action and I need to press OK on that automatically.
I am allowed to write a windows application if not a console application and also use the web browser control to load the webpage rather than opening and interacting with the browser. If this makes it easier than so be it.
Here is this code of the webpage:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
[code]....
I've spent hours trying to get this figured out and I keep getting the same F'ing error "Object reference not set to an instance of an object.". I need to be able to automatically click a button on a web page through my webBrowser (webBrowser1) but the problem is the button on the page is setup a little funny. The button looks like...
[Code]...
Here is this code of the webpage:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<title>File List</title>
<style>
[Code]...
What I am wanting to do is create a program that will load up a page (it is password protected) and get the links out of any files that I need to download. The green text is the text that contains the link and will be repeated for every file.One little thing is that there are multiple pages that are accessed through JavaScript with the code highlighted in red. So, I also need to step through the pages and get a list of all files on subsequent pages.
Everytime I run this program, it will get a list of all files and only download the ones that aren't already downloaded. However, I have never done this before and was wondering what I need.I have accessed the source of pages and parsed it for things like links before, but not sure if that is the optimal way or if there is some other way to handle this particular situation easier, especially since I have multiple pages to deal with and JavaScript.
need to know how to control web page (html , php ) submit and get in background and display resuts ?like if page has input text that results in data
View 3 RepliesI have the following code to open a webpage:
Dim IE As Object
Dim x As Integer
Dim c As Variant
[code]....
The page that opens is in xml and in that xml there is the "page_count" that I need to pick out so I can tell my macro when to stop looping. I have dimmed it as "c" in the code above. Following is the XML.
<search>
<total_items>360</total_items>
<page_size>100</page_size>
<page_count>4</page_count>
Somehow I need c = "4", which is the "page_count". Does anyone know how I can pick out the "4" from the xml on my page?
Extract Data from Webpage?I have this code so far.[code]...
View 2 RepliesI want to extract text from a web page, I used the web-browser component but I found only to load the webpage, how can I read text from the webpage?
View 2 RepliesI want to extract the user id in the webpage[code]...
View 7 RepliesI wanted to extract today's date from [URL] and the expected output will be: Wednesday, December 14th, 2011
View 3 RepliesI am working on a project just for fun in my spare time and would like to know how to extract certain text from a webpage. For example: One of the tools I wish to have is a translator and I wish to use google translate set on Detect language to English. What I wish to extract is the translated text into the form or a msgbox.
View 2 Replieshow to extract data from this web page url...Its mainly the Ip address and port but i have no idea in where to start. I know to start out with this Dim elements As HtmlElement Collection = Me.botBrowser.Document.All.but i dont know how i would transverse the source code to find the ip address and port.Also like if i just wanted to first one on the page each time the page refreshed how would i do this also
View 7 Replieshow can I extract the source code of a web page and to save it into a text file -- I would like to have a VB code to do the same?
View 3 RepliesBasically I am building a webcrawler and in order to do so
I have to extract the page source of a webpage which I can do so like this:
CODE:
The above code works fine on most of the websites I have tried to extract page source from but for some reason it is failing to extract the html contents of few websites like these where the message posted by a user is nowhere to be seen? The webpage in question is this: [URL]
Is there something I have missed or is it due to forum protection etc which is preventing the vb application from extracting the whole page source?
I am trying to build a VB.NET 2005 windows app which gets cars info from a ebpage(webapplication) that has a username and password.I was able to programmatically login to this webpage(by automatically populating the input boxes using webbrowser control) And after I logged in, I could view the cars data in browser and I did "View Source" but the cars data (such as car model, brand, color etc..) were not viewable in the page source code
View 17 RepliesI am trying to build a VB.NET windows app which gets cars info from a webpage (web application) that has a username and password. I was able to programmatically login to this webpage(by automatically populating the input boxes) And after I logged in, I could view the cars data in browser and I did "View Source" but the cars data (such as car model, brand, color etc..) were not viewable in the page source code. So how can I read these data with my application?
View 9 RepliesI wanted to extract today's date from
[URL]
and the expected output will be: Wednesday, December 14th, 2011
How to go about extracting user comments on likes of forums by using the page source.[code]...
View 6 RepliesI am trying to build a VB.NET 2005 windows app which gets cars info from a webpage(webapplication) that has a username and password.
I was able to programmatically login to this webpage(by automatically populating the input boxes using webbrowser control) And after I logged in, I could view the cars data in browser and I did "View Source" but the cars data (such as car model, brand, color etc..) were not viewable in the page source code. So how can I read these data with my application?
I have a resource file for a program, and i have determined that the resource file just a big string of files glued together whole, i know that the movies contained in the file are quicktime mov. Where can i find information on the quicktime header? and how can i determine the length of a file once i find it?
View 1 RepliesI have been trying to extract the text between multiple tags on a web page with the same outerhtml info. For example:
[Code]...
On the main form of my application, I added a menu strip button to it to open another form rcgntn.vb in my application.[code]...
View 1 RepliesI've created the beginnings of my new web application, but I am often coming up against the issue that ASP.NET renames elements IDs or in the case of form fields, their names.I have a form which is basically a sales system. It is essentially made up of two User Controls, one is a form for Customer Details (name, address etc) and the second is a form for the customer's purchases, it consists of a number lines dynamically created by Javascript created as you list the items the customer is purchasing. Both these sections are User Controls because they are to be used for other areas of the system where this data will need to be recalled/re-entered.When the USer Control is loaded, the field which contains the Customers' Name is renamed "m$mainContent$customerForm$name" I understand where this comes from, "m" is the ID of my Master Page, "mainContent" is the main Content Placeholder and "customerForm" is the name of the User Control.
In fact, in my case, this will always remain the same on all forms, so it is relative easy to overcome... but... suppose it wasn'tI can see there are ways I could deal with this with Javascript, but the form doesn't need an AJAX submit, a normal Post will do fine for this, so when I open up the recieving page I want to call Request.Form("name")% to save the customer's name into the database, but of course I really need Request.Form("m$mainContent$customerForm $name")%How would I dynamically extract those prefixes from the posting form to ensure that if I rename anything or use it in a different scenario, the problem will not break it?I am using .NET 2.0, so can't use Static Client.
I've created the beginnings of my new web application, but I am often coming up against the issue that ASP.NET renames elements IDs or in the case of form fields, their names.I have a form which is basically a sales system. It is essentially made up of two User Controls, one is a form for Customer Details (name, address etc) and the second is a form for the customer's purchases, it consists of a number lines dynamically created by Javascript created as you list the items the customer is purchasing. Both these sections are User Controls because they are to be used for other areas of the system where this data will need to be recalled/re-entered.
When the USer Control is loaded, the field which contains the Customers' Name is renamed "m$mainContent$customerForm$name" I understand where this comes from, "m" is the ID of my Master Page, "mainContent" is the main Content Placeholder and "customerForm" is the name of the User Control.In fact, in my case, this will always remain the same on all forms, so it is relative easy to overcome... but... suppose it wasn't I can see there are ways I could deal with this with Javascript, but the form doesn't need an AJAX submit, a normal Post will do fine for this, so when I open up the recieving page I want to call Request.Form("name")% to save the customer's name into the database, but of course I really need Request.Form("m$mainContent$customerForm$name")% How would I dynamically extract those prefixes from the posting form to ensure that if I rename anything or use it in a different scenario, the problem will not break it?
I have a view with a few checkboxes that can be selected or unselected. I'd like to always register any change in a checkbox, without the use of a submit button (the user could forget to do it, and it would waste time). So, is there a way to handle this inside the view? Up to now, I've only used the controller to do that job.
[Code]...
I have to use Form.Action to redirect to a script that will be picking up values from my page. It is worth noting that this script is external.My issue is that I also want the button that is clicked and has the Action hooked up to it, to also complete some functionality in the code behind first.Is there anyway I can either :In the buttons click event handler, can I set the Form.Action and then call something such as Form.Submit?OR Set up the Form.Action in advance and then somehow have the button posting back before the action takes place.
View 5 Replies