Silverlight functionality not working on Mac - c#

I have an application built in silverlight and it has a functionality that uploads an excel file and an image file on individual button clicks.
When I open the app on windows (Internet Explorer, Safari, Chrome) - it works smoothly.
When I open the same application on Mac, this functionality (image and excel upload) fails.
Button_1 to Upload Image - I do get the file dialog box, I select the file, but when I say Ok, I do not get any errors, but the image upload does not work (I do not see the image uploaded)
Button_2 to Upload Excel - I do get the file dialog box, I select the file but when I say Ok (Error message: Excel is already open but I have checked numerous times... Excel is closed)
This error I am getting is only on Mac Machines... On all windows machines, it works smoothly
Silverlight Version - 5.1.302, Mac - 10.7.5, Browser - Safari - 6.1.1
Any clues?

I have found solution for this. We need to make some security changes in the Safari settings. Following are the steps I tried and things working fine. 1. Open Safari
2. Open desired application where you have issue
3. Click Safari from Top Menu Go to Preferences  Security  Internet Plug-ins ( Click on Manage Website Settings )
4. Left Window locate Silverlight and select it.
5. After selecting Silverlight  On right side window  You will see “website you have opened” and a dropdown  From Dropdown  Select  Allow Always and Run in Unsafe Mode
6. You will be prompted with some warning message – so that is ok… Say Ok and then click Done.
Close Safari completely – Make sure Safari browser is closed completely.
Open New Safari browser instance and launch application. Since I am running application in secure network - running application in unsafe mode do not cause any security level issues.

Related

Cannot upload file to D365 in headless mode Selenium C#

I have a set of Dynamics 365 automated tests which run fine whilst the browser window is open on the screen, but when I run the tests in headless mode, all of them fail when trying to upload a document.
This is my current code for uploading the file:
PaperClipButton().Click(); // this clicks the paperclip icon to open the file upload window
Driver.SwitchTo().ActiveElement();
SendKeys.SendWait(#$"{rootDirectory}\MyFile.pdf");
SendKeys.SendWait(#"{Enter}");
When running in headless mode it inputs the string that is supposed to go into the file upload window inside the Visual Studio window when I'm debugging the test and not in the browser where it's supposed to go.
I've checked the failure screenshot and it doesn't open the file upload window at all and fails on the step where it checks the file has been uploaded.
Also tried removing the line for SwitchTo().ActiveElement() but get the same result
Has anyone had similar issues with D365 automation?
Thanks in advance
I recommend to put the file in your solution and do paperclipElement.sendKeys the path.
Once you click on paperclip, I am guessing file explorer will open up, Selenium cannot control OS applications.

ClickOnce deployment: Why is there a 404 error on a URL which, if pasted into the browser, has no problems?

I've published a half dozen apps written in C# using Visual Studio and ClickOnce to IIS running on my development PC but with one solution, which has a VB.NET main project and C# class library, I'm getting an error message: Invalid URI: The hostname could not be parsed.
The app is being launched via the launch link in the publish.htm file. Edge asks if I want to open it. I click the OPEN button and the app is downloaded and the progress bar finishes and then there's the popup error message saying that the URL could not be parsed.
When I check the IIS logs it looks like this:
https://mypc/apps/foo/publish.htm 404 0 2 1
But if I paste the URL https://mypc/apps/foo/publish.htm into the Edge browser's address box, the page is opened in the browser without any issue:
So I don't understand the 404 error. The other apps, all of which can be launched without issue from their publish.htm page, are published in identical manner, to the same website location in sibling folders:
https://mypc/apps/foo2/publish.htm
The structural differences between this solution and the others are
the EXE project of this problem solution is written in VB.NET and there is another project in the solution written in C# that produces a class library and
in the problem solution on the EXE's Properties->Application tab, there are two buttons: Assembly Information and View Windows Settings whereas on all the other working apps there is no View Windows Settings button on that tab and
on the working applications there is a Manifest option on the Application tab, where one of the choices is "embed manifest with default settings" whereas on the VB project's Application tab there is no such Manifest dropdown visible.
I hope there is some clue in these details. What am I missing and how to proceed to troubleshoot this?

How do I set the default browser in Visual Studio 2017?

I don't have the stupid Browse With, and every time i figure out where it's out it only gives me options for Internet Explorer... It doesn't give me an option to change the browser... Strange enough I've already removed Internet Explorer from my PC... How is it still using it...
"Browse With" is still available
You should be able to select the browser you want from the next window, its self- explanatory.
Try this out
First you have to install google chrome
Then go to visual studio and you can see a attach button with combo
on the top of the window
Click the combo to select the browser
You can see a window of attach process
Their you can see a available processes grid and select the chrome
browser
Go To Project
==> open folder
==> select file (ex: sample.aspx)
==>left click
==> select Browse with
==>Select Chrome
==>Click Set As Default
It works

Start development server not on the default browser

I have ASP.NET MVC 4 application and I am debugging it with the built it development server( not IIS) my default browser is firefox so every time I click on "Debug" it open new firefox tab. I want to check my web on chrome also. what is the easiest way to make it? ( I don't want to change my default browser).
Choose a page in your project and right click and choose browse with and select your browser and set default
In MVC:
If you right click on any page other than default.aspx you will not get the "browse with" option.
So, when working on an ASP.NET MVC application, right click on default.aspx and chose "Browse With..." Then you'll get a dialog that will allow you to change your default browser.
NOTE:
for ASP.NET MVC3 projecs,You need to specifically add a .htm or .html page, and then right click that and choose Browse With and set to default
ALternative:
Default Browser Changer extension
Link
When you are in debug mode and it loads in Firefox, copy the url to the other browser.
Then go to Debug > Attach to Process, and select the process for the other browser and click [Attach].
A different approach using powershell scripts is shown in this blog post.
Ultimately, the easiest approach would be to use Visual Studio 2012 or 2013, which have this functionality built in to the debug button in the menu.

Icon in WPF Browser application

I have a WPF Browser Application consisting mostly of wpf pages which I'm developing in Visual Studio 2010.
I'm publishing the app to the intranet, with ClickOnce at full trust.
Is there any way to have an icon for the pages in this type of application? (which would show instead of the internet explorer icon in each of the tabs of Internet Explorer), I'm executing it through PresentationHost.exe.
What I'm trying to do, is to have a desktop shortcut with a custom icon for each part of the application (two different projects in the same solution).
If there isn't a way to do it with XAML, is there any way to run any commands or a batch file at the moment of accepting the ClickOnce prompt?, to place the shortcuts in the desktop with their respective icons at the moment of installing the application.
Thanks in advance, Jesús.
P.S: I know my redaction skills suck, so if any more details are needed, let me know.
If you open your project file and change the HostInBrowser setting to false, and this will enable the ability to provide an Icon and Manifest in the project's properties.
<HostInBrowser>False</HostInBrowser>
I am not sure how that will affect your app though. Maybe this setting is supposed to be "True" to work how you need it to work.
Did you set the icon for each project, in VS right click on the project - properties - Icon and manifest - click the icon button ...

Categories