How to find out the link of an element id - html

I am trying to make a youtube downloader. This works via the webbrowser , so for example the user types in the link of the youtube video in my textbox1 and the webbrowser redirects to "mp4.ee" and inserts the link and then it automatically clicks download. However once you click download on mp4.ee, another download button appears. And here lies my problem, if I click on the second download link it will ask me to save the file however I want to find out the link of the second download button since I want my program to download the file automatically with it's downloader.
My codes:
Code to insert link into mp4.ee and press download:
WebBrowser1.Document.GetElementById("Form").SetAttribute("value", TextBox1.Text)
WebBrowser1.Document.GetElementById("Button").InvokeMember("click")
Application.DoEvents()
With this code it click the second download button which then asks you to save the file however I want to find out the link this button contains in string format:
WebBrowser1.Document.GetElementById("PopupWindowButton").InvokeMember("click")

You can use JQUERY.
$("#Form").val(""+value); //get value
$("#Button").click(function() // event click of button
{});
see this try.jquery.com functions

Related

Check if a new if a new tab was opened with puppeteer

I am using Puppeteer to gather a list of companies that hire remotely. The page I am trying to collect the data from has a call to action that is not an <a href="" blank"_tab", but a <button></button>. The button doesn't have any data attribute either, that gives a hint as to what the URL of the page that gets opened in a new tab, when I click the button, is. I am now trying to find a way to catch the opening of the new tab, by clicking the said button, to then fetch the URL of the newly opened tab. Is this possible with puppeteer?
The solution is to extract all pages of the browser via the browser.pages() method call.
In your puppeteer project you always start by initialising the browser. The puppeteer virtual browser does contain the method pages(). Usage of pages().
What you have to do now: At first get the current url of the current page you are on. Then stream the result of the browser.pages() method. While streaming the array you can just get the index of your current tab. The tab you just opened using the button is the page with that index + 1 (the next element in the array)...
How to handle multiple tabs
Puppeteer Documentation about pages()

How to show the upload file dialog on page load

Using PF10 (in a JoinFaces project), I'd like the Upload File dialog for choosing a file to show up when the page loads (i.e., without waiting for the user to click on the Choose button of <p:fileUpload/>). How can I do that?
You could use client side API show() function for this. But it seems more and more browsers are blocking triggering a click by script on an input type="file". See https://github.com/primefaces/primefaces/issues/7772
You could take your chances and try to hijack a mouse move event to trigger a click on the upload input, which is answered on this question: In JavaScript can I make a "click" event fire programmatically for a file input element? But I don't really like that hack.

vba in html- Need to onmouseup login which is not a button

Is it possible to automate a login page using vba which has a mousedown and mouseup clicks . When i click a login button it has a mousedown click as it doesn't have any button in order to automate using vba.
Please let me know if its possible to do so in vba using some functions
Please copy the URL and paste in internet tab: "http://discovery.ariba.com/rfx/3796429". After clicking the URL you will enter to Ariba Discovery site and there you have this Ship to Service location field. In that ship to service location field there are multiple locations and we need to click on "Show more". To click show more if we see the html code it's not a button in order to automate the click. It's awmouseup and aw is the page name i guess. I would recommend you yo use google chrome and try inspecting the html code. I need to automate the click using VBA code.
ie.document.getElementById("_sbsyf").click
should do it

WordPress - Click download link to display popup form

Our website is currently being created on WordPress, and we will soon have a large resource centre for PDF downloads. We need to be able to capture user data before customers download the PDF files - however we need to keep the forms hidden and only display the download title, before clicking on the link.
Is there a plugin or some code already created that can do the following:
Using download monitor (or another plugin), add an extra checkbox field labelled 'Request a form'
If the 'Request a form' checkbox is ticked, when a user clicks on that download link, an overlay form will appear
Once they've filled in the form details their download will automatically be emailed to them.
Any help would be much appreciated, or any other suggestions!
Looking for the same thing, any progress? Im looking for the same Form to Download Link protection, for each link to a download file to pop-up a contact form before you can download.

Open a link to new tab inside a ifame of iframe

I have a iframe-1 and it contains another iframe-1-1.[1]
Inside iframe-1-1 which contains a link.
When a user click the link:
It should open a new tab (For instance, Firebug/or Chrome).[2]
But it does not work. How can I do that?
[1] Why I have this question: because I code a webpage, it is embedded in Facebook, and I call FB.dialog it will show me a dialog is a iframe too.
[2] It works properly if I use wheel button to click.
You can't instruct a browser to open a new tab. The best you can do is to use target="_blank" and hope that the user is using a browser that will open a tab and not a new window.