So what I'm trying to make is something like this:
1).exe file has a web browser
2)web browser directs you to a button
3)i use the code "Dim elements = WebBrowser1.Document.GetElementById("nupuke420_kitchen")" to focus on the button
But that code was all i found from research. Can anyone please guide me on how do I actually make my program click on it every 3 milliseconds? Thank you
The answer is: "elements.InvokeMember("click")
Related
I want to know how the pop up windows integrated into websites are built. I am trying to create one for my websites but i don't really know it is created whether they are plugins or not. Any help as to how to go about it.
Below is an example of what i want to do.
You can use hotjar.com to put a feedback box in your page, there is a lot of services that provides this feature, but hotjar gets the job done
Beginner! To make a pop-up like the one you provided, you would need to write backend code (Node.JS, PHP, Python, etc.). But for just a simple info pop-up with a button that activates the pop-up refer to this jsfiddle I created:
https://jsfiddle.net/d706dyg7/1/
$("#whateverid").click(function(){
//whatever code
});
That mean when that element is clicked blah happens.
Hope that helps,
Ben A.K.A BlackSky
P.S. If you want a solution in pure javascript and not jQuery just let me know and I will edit my fiddle!
I know I'm like .. 10 years late. But for anyone still wondering I thought I could be of some help!
If you want to do this using ONLY html and css (using a framework in visual studio like ASP.NET) for example.. here's what I did:
First, I made sure I had multiple "divs" in my code. For me specifically, I had two main ones. The first one whose id="main", and another whose id="popup" with the 'visible' property initially set to 'false' for the popup div.
Then, on whichever event you're looking for (button click for example) you'll simply set main.Visible = false and popup.Visible = true, then you could have more buttons in your popup (yes, no, cancel, confirm, etc.) which do the exact same thing, but in reverse!
The most important thing to make sure of is that you have the 'runat="server"' property in your divs so that you can access them in your CS code
Hope this was helpful! :)
Your looking for something called a modal. Depending how you wrote your HTML there are different ways of approaching this issue.
If your wrote your website in Plain HTML you can use the following tutorial to create one
www.webdesignerdepot.com/2012/10/creating-a-modal-window-with-html5-and-css3/amp/
However if you wrote your website with a library such as Bootstrap they have built in pre made modules that you can attach to your cpde. These can Ben found in the library's documentation.
i am trying to inspect an element . When i right click and inspect that element i see the below things
Screenshot1
Screenshot2
I tried below but it didn't worked for me
driver.findElement(By.id("tmsMobileId")).click();
Can someone please help me here.
It's possible the web page is not loading completely when the click() executes, so it won't be able to find what it is supposed to click on. You may need to sleep the script for a couple seconds.
Otherwise, take a look at this link:
How to click an element in Selenium WebDriver using JavaScript
OK. So first, I will try my best to explain so good. My friend has gotten cursed out on this forum for not explaining, so I will explain. :)
Ok so I have my program built and all. But then it hit me! Wouldn't it be better to add a news feature? One teeny tiny problem? I cant? How would I implement a interactive code into an HTML page.
Like can i connect a button to a URL that will make the program do something. Almost like you can open cydia tweaks with there identifier and url EXAMPLE: http://handleopenurl.com/scheme/cydia And then i can add urls so i can update the program, without updating the files.
Or even just a featured news thing would be nice. But how would i implement this perfectly. I tryed a webrowser, but the page is too big for it. I am good at html, not much at css, i mostly use Adobe Muse http://www.adobe.com/Muse
Last question. Kinda defies the first thing i said about having my program finished.
Is there a way i can add a plus button and make it add more buttons and more labels and all?
This would help with allowing users to customize more then what the program can handle. By The Way, its a winter board Theme Maker. So I have a bunch of icons with there bundle identifiers and I create the folders with VB.net and all that stuff. But i want users to be able to click a plus button to add MORE text boxes and file browsers.
Any ideas? Maybe DIM 1 as NewFileBrowser? But i need to move all the buttons and i need it to be able to be clicked an infinity amount of times. I can do the coding for all of these buttons, but i jest need to know how to create them <1 Move them and the button so that the button goes further down each time, and more boxes will go further down. Much help apreciated. THANKS:)
EDIT:
Are you trying to say that you're wondering how to have a web browser control in a vb.net >app, which displays a web page, and when a button is clicked on the page, your app detects >it and does something? – Thraka
That sums up the top part. I am using windows forms, and it is coded in VB.net
If you get the object you want, like the button, you can hook the event and have it call code in your form.
Find the object using the Browser.Document.GetElementById method.
With that object, add an event handler to the Click event.
See http://msdn.microsoft.com/en-us/library/system.windows.forms.htmlelementeventhandler(v=vs.110).aspx for information about the event handler used
I'm making a rather simple online store page at http://pyentertainment.com/store.html integrating PayPal for payments, and just when I thought I was done I noticed none of the hyperlinks seem to do anything. By this I mean when I click them (I'm using Chrome and the same happens on other browsers too), on the status bar where it normally says "loading www.xyz.com" it changes to something for a fraction of a second and then disappears, not loading a new page; it's way too fast for me to catch what it says.
This happens to the links on the nav bar and to the social media links on the right.
Some context: When you click on an item, the page dims and an iframe comes up showcasing said product, with PayPal cart buttons. View cart/Add to cart open a new tab, but if you close them by clicking "continue shopping" they throw another error which although I'm not too concerned about might be the cause of the problem; I know iframes can be iffy to work with.
I'd appreciate any help. The links work on the rest of the domain, too.
Thanks in advance!
I would suggest downloading firebug from here:
Firebug Home Page
And watching what loads while you're loading your page, it will tell you if the resource is actually being located/served when the page is processing. If it's not, you may want to review how you built your links toe ensure they're properly configured.
Thanks guys, the issue ended up being that I had the entire body to check for clicks, and if the user clicked outside the item display box while it was on, dim it out, like this:
$('body').click(function(event)
{
if(!$(event.target).is('#productDisplay'))
{
$("#darkenBackground").fadeOut();
$("#productDisplay").attr('src','buy/loading.html');
return false;
}
});
I got rid of that feature and instead added a little close button to do the same thing. The links work now! Thank you all for your help :)
i cant give a full answer but it looks like its your dimmer specificly the part that detects the body click. try putting it into an if statement to check that the functon has been called before running the body click function
EDIT
something like
if(product displayed) {
look for click event on body
}
Is there any way of showing a link's destination from a swf in the browser? The answer might be a simple no.
Hard to explain, so I have attached a screenshot that makes it clearer.
Looking at http://kb2.adobe.com/cps/148/tn_14827.html , it seems possible to change the status bar of the browser from flash. As far as I know you still need to do this by hand for a button.
An other way is to use JavaScript calls from Flash (see http://naarvoren.nl/artikel/flash_en_javascript/deploy/basic_demo.html for a demo).
I guess you could use ExternalInterface to call javascript that changes the "window.status" but you would have to create a MouseEvent.MOUSE_OVER, MouseEvent.MOUSE_OUT event listeneres on every link :)