Watin UploadiFy - watin

I am using WatiN for browser automation. But today i ended up in a problem where i need to call the flash object (uploadify button) in my asp.net page.
This code seems working fine, but doesn't show any actions
Element ele = window.Element(Find.ById("uploadifyUploader"));
ele.Click();
Is there a way to achive this in WatiN.?

Watin is not able to access flash objects.
You can try AutoIt library.
Or use javascript library. For example this: http://www.permadi.com/tutorial/flashjscommand/

Related

MbUnit Gallio WatiN Right-Click Testing on a link

I want to test right click on a link by using MbUnit, Gallio and WatiN. Currently I can not see what is the way to do that. It seems that there is no method for right click which I can call from the framework. I am sure that there is a workaround, which I was not able to find currently.
In WatiN, you might need to fire event directly, such as
myElement.FireEvent("oncontextmenu")
Also look at:
WatiN FireEvent not passing event properties in FireFox
In selenium WebDriver, you can Use the Actions class.
In C#,
IWebElement element = driver.FindElement(By.LinkText("LinkText"));
Actions actioner = new Actions(driver);
actioner.MoveToElement(elem).ContextClick(elem).Perform();

How to inject JavaScript using FireBreath

is it possible to inject javascript inside a web page from a Plug-In made under FireBreath Framework? i dont want to use safari extensions so I am wondering if using Plug-ins I can do the same or even more than suggest do it with Extensions. Mi idea is to write a function that detects a keyPress event in whatever textbox in the page and then pass the message to a javascript function which communicate with the JSAPI function exposed by the plugin.
thanks for any suggestions or guide.
BTW I am creating the firebreath plug-in to work with Mac OSx platform.
While you can inject JavaScript into a page from a plugin - just like you could from JavaScript - you'd need to get the plugin embedded into the page.
If you have that kind of control over the page then you won't need a plugin in the first place.
To have control over arbitrary pages that you can't control directly, you need a browser-extension/-addon. This article contains more detail on the subject.

Get current browser html content in chrome extension development?

I am working with chrome extension development and bubble box jquery plugin.
I need to get current browser html content using chrome extension so that I will add html content on It using bubble box jquery plugin.
Have you any idea how to get html content.
Thanks in advance
Well, you are using jquery so the easy way to get the entire page's html is $(document).html
This is pretty basic stuff. Are you stuck trying to figure out how to create your first working chrome extension?

How to quickly write a firefox extension?

I'm to make a firefox extension which will inject some js code as well as whole jQuery lib.
I want it to happen (the injection) when user pushes the button placed somewhere in the browser. I have read docs form MDC and other tutorials about making the extensions and they seem complicated to me. Technologies such as XPCOM or XUL are completely useles form me (I have no time to learn them in fact). My question is, is it another way of solving my problem then following MDC? I need to find quicker way of doing my task.
I've already written the extension for Google Chrome, and it was a way simplier than doing it for Firefox.
I would take a look at Greasemonkey. It shares some similarity with Chrome plugins in function (Script gets injected on the page, local storage, etc). As for using JQuery with Greasemonkey, look at this question: How can I use jQuery in Greasemonkey?
You can use a bookmarklet to add jQuery to a page and/or inject any other code.

Firefox crashes with mulitple Uploadify JQuery browse buttons and ajax

I'm using four JQuery Uploadify browse buttons on a page that's calling the Uploadify code/buttons through Ajax. We have a javascript function called from onComplete which refreshes the Ajax page. The problem we're encountering is that when you start uploading one file, if you click browse to upload another file, Firefox will crash when selecting the second file.
Any help is appreciated.
Thanks!
The solution I ended up with was to just hide the other buttons while an upload is in progress.
Is there a reason you wouldn't use the built-in multiple-file upload functionality that Uploadify allows? In most cases it's as simple as setting:
'multi' : true

Resources