Button Click in webpage via HTMLagilitypack - vb.net

I am trying to fillout particular form over webpage using HTMLagility pack, but I am stuck as How to click the button on form via HTMLAgility. I have seen other option like HTMLElement, but I am not much into it.
below is link where one can have look
http://www.moneycontrol.com/india/fnoquote/acc/ACC
in this page, I am able to select "STOCK" dropdown menu and Expiry dropdown by setting attributes. But I need to click the "SEARCH FUTURES" button.
Any help of kind will be absolutely thankful.
All code should be explan in vb.net requested

You can't use the Html Agility Pack to click to click a button, nor do you want to. The easiest way to achieve what you are tying to do is install a tool that will view HTTP post parameters. I use fiddler, and you can download it here: http://www.telerik.com/download/fiddler. When you click the "Search Futures" button, here is the POST data that is sent:
instrument_type=FUTSTK&post_flag=true&see_all=&sc_id=MPS&short_name=Adani+Ports&user_sel_price=&stock_code=MPS&sel_exp_date=2014-02-26
If you look closery you can see "Adani Ports" and "2014-02-26". Those are the values from the the Stock and Expiry Date drop downs. Modify those two values to whatever you want, then send an HTTP POST from your app containing that post data.

Related

How to get html page content on button click in Xamarin.Forms?

I am creating an application in that it gets data from the web view that opens from the page and when the user enters data and then save into that then it saves data into the database using c#.
I have to try to make a local Html webpage and on click of button try to get the value of Html page content but when I try with that I am not able to do that.
I also try with the hosted web URL but can't do that.
I am using .Net standard 2.0.3
Can anyone look into this and suggest to me what should I to do to achieve that?

OneNote 2016: How to: selected text in a page & subscribe to the onClick event

I want to implement a COM OneNote Add-In (for OneNote Desktop) with the following functionality:
User selects some text and then clicks the FORMAT button exposed by the add-in: the add-in will format the selected text in some specific way (e.g. surround the text with "<<>>" and change its background and foreground color.
Later on when the user clicks on a text that was formatted as described above the add-in kicks in and copies the text in clipboard
I am new to COM add-ins, and I wasn't able to find a good API documentation. I've started with VanillaAddIn (https://github.com/OneNoteDev/VanillaAddIn) and now I need to add my functionality. I would really appreciate any help with the following:
How to get the selected text from a page?
How to subscribe to the OnClick event?
Is there a good/decent OneNote API documentation? I found some links but I still hope there is a better one that I missed so far.
To get selected text from a page, look at the GetPageContent API. You can see it used here: https://github.com/OneNoteDev/VanillaAddIn/blob/master/VanillaConsole/Program.cs
From the page content xml, you can find some elements that are "selected".
OnClick event: There's no way to know when someone clicks on some text on the page, unfortunately.
One site that can help with parsing the page content is the OneNote XSD. Here: https://msdnshared.blob.core.windows.net/media/MSDNBlogsFS/prod.evol.blogs.msdn.com/CommunityServer.Blogs.Components.WeblogFiles/00/00/00/63/17/0336.OneNoteApplication_2013_xsd.txt

VB.NET Button clicks stuff in webbrowser1

How can i make it where you click button 1 and on a page like www.youtube.com/shanedawsontv in webbrowser1 it will click the text Add as friend cause they don't have ids for that please help
You'll likely have to use the WebBrowser Control's DocumentText Property to get the HTML of the page so that you can parse the required HTTP request required to add the user as a friend. That's likely to be no easy task with YouTube as it will probably be using hidden fields and Javascript (from a separate .js file) to make the request.

Display Pop-Up in PDF when Clicked or Typed?

I have a collection of example documents in PDF forms that are viewed by clients, They all include a "Example" watermark prominently displayed but I have had some issues with clients trying to fill in the example forms and submitting as Official forms, normally followed by a support phone call from the client. I am looking for a way to pop up a message in the pdf if the client trys to type or click in the example document, I know how to pop up a message if they click in a form field but some of my documents do not have any form fields so I am looking for a way to show a message if a client trys to type or click anywhere in the actual document. I am using Acrobat X Pro.
Does anyone know of a way to do this?
Thanks in advance for any advice!!
Plop a big invisible button (not hidden, invisible) over the entire page, with a click action that pops up a message dialog with whatever warning you wish.

How do I click a hyper link in a web browser automatically in vb.net?

Let's say my browser goes to a page similar to this one below ..
Picture Is Here
On this page there is a hyper link called 'Click Here' .. when I click it, it opens another window with things in it.
How can I click this hyper link in vb.net automatically without me clicking on it with the mouse, and how do I open the window in a second web browser ?
We can assume that the first browser is called (WebBroswer1 ) and the second one is called (WebBrower2).
I know how to perform buttons clicks and do raise the 'OnClick' Events, but I don't know how to do it with a hyper links.
Please any help will be appreciated, I look forward for solutions.
If you have jquery available in your webpage you can do something like
Say you have Click Here
you can programatically trigger the click of that link by doing:
$("#webbrowser2").trigger("click");
HTH