Does Silverlight run on the Client - silverlight

I would like to know if silverlight run on the client like javascript. Silverlight will be doing alot of work and I want to make sure it all runs on the client.
How do i know if a button click goes back to the server or not?

Yes, Silverlight runs in the browser. The compiled code gets downloaded to the browser in a .XAP file and then runs locally. A button click would not cause anything to happen on the server unless you actually wrote code to call a service.

Yes, Silverlight apps are downloaded and run on client, just like flash and javascript. You have total control for users interactions being sent to the server or not, so it depends on how you want your application to behave.

Related

Problems with making Silverlight project out of browser

I have a task to make large Silverlight project run out of browser.
Fortunatelly I don't have to rewrite it to some other technology. Unfortunatelly I can not understand how to make it work OOB. I tried everything that's in guides :
enabling OOB option, installing and tryiung to debug installed app, but main thing is that when I run this app OOB I can't reach any services (no matter how I try HTML Bridge is disabled in OOB).
Is there a way to reach those services (like https://localhost/WCFRest/GetUserInfo?login=somelogin&password=somepassword) from OOB enviroment?
What should I do to reach them?
I'm sorry if this is noob quetion but I can't ask anyone else.
I assume you have a Web project in your solution. I think you changed the startup project to the silverlight project. You need to start up the Web project too.
Do the following:
Right click on the solution in the Solution Explorer and select Properties.
Select "Multiple startup projects" and set the action to "Start" (on the web project)
Or just simply right click on a HTML or ASPX file in the web project and select "View in Browser".

C# Selenium Webdriver Interacting with native image upload dialog using SendKeys.SendWait does not work on TeamCity

I am using Windows.Forms.SendKeys.SendWait to interact with the native windows dialog when uploading an image.
I click the upload button using webdriver, then go:
SendKeys.SendWait("^A"); //Highlight content so it can be overwritten
SendKeys.SendWait(path);
SendKeys.SendWait(#"{Enter}");
Works great when I run it locally on my PC, however, the test won't run on the TeamCity agent (I have many other tests that run OK). It fails as it seems that native dialog never appears or if it does, it can't interact with it.
Not sure what's happening as this whole test agent process runs in the background and I can't see what it's doing - I can take screenshots using webdriver but it won't capture native dialogs anyway.
I tried to configure the team city test agent windows service (change Log On settings to allow interacting with desktop) but this did not work. Seems it just isn't able to interact with it... any ideas on how to make this work?
In order to upload a file with Selenium, you should use Webdriver's SendKeys directly to the input element that requires the path (Not Forms.SendKeys). See this example.
Note: You'll need to avoid clicking the button that opens the dialog.

How do I make selenium see the network requests made by a web browser?

I have a dotnet Selenium web driver app.
When I'm testing the page one of the things I need to confirm is that a flash object on the page has pulled correct content from a content store on my site. (i.e. the flash object should be loading content from /stuff/info.txt and including that content within the animation.)
As a human looking at this I can use the chrome network tab and see that /stuff/info.txt has been accessed.
How can I make Selenium execute a similar watch and see the network requests made by a web browser?
I did not wrote this, neither tested it however someone did it here: http://www.softwareishard.com/blog/firebug/automate-page-load-performance-testing-with-firebug-and-selenium/
Basically all the requests are exported via netexport and firebug plugins inside a HAR (Http ARchive file)
Please give us your feedback if you give it a try!
Cheers !
I assume you want to automate the process which the developer tools of browsers does. Something like firebug but for verification using Code.
I don't believe Selenium has such features. For now, you will not be able to achieve this.

What if we don't host our silverlight Application when we first Create it?

As we all know very well..
whenever we create application inside silverlight it is asking us for hosting it
by dialogue box at given below.
My question is what if i unchecked the check box[Host the silverlight application in a new web site].
Means what kind of problem we have to face later if I don't host our Silverlight Application in any of the option given by dialogue box.
Basically it is not a problem at all. You can add a website at any time later.
In the project settings of a website there is a Silverlight tab. Under that you will find the option to add Silverlight projects to the website. This will setup the links to generate the XAP in ClientBin as well as giving you the option to create test pages for each Silverlight app added. The test pages will give you the sample JS you need to host your Xap later.
You will have to eventually host your application somewhere otherwise it will stay on your local harddrive and hardly reach any clients. So if you have an existing web site you could simply copy-paste the necessary javascript to this site later in order to embed your Silverlight application. In this case you can uncheck this checkbox.

Detach Silverlight 4 Out-of-Browser Window

I'm writing a Silverlight OOB application. Once the user has installed it, I would like the in-browser experience, on next visit, to just have a button to launch the OOB version. I know the API call to detect that it's installed, but I'm not sure to open my main Page control as or within a Window. Currently my in-browser view changes to say "Please launch from the installed shortcut" but that seems like it should be unnecessary. Is there a way to do this?
Thanks.
Unfortunately launching OOB app from the web page is not supported. This is commonly requested feature, but it looks like SL5 is not going to address it.

Resources