When I clicked button with mouse, File Download Dialog opens directly. But when Watin Button Click methods click the vert same button on same ie window this message appears and wait my confirm
To help protect your security,
Internet Explorer blocked this site
from downloading files to your
computer. Click here for options.
I turned off the Information bar for file downloads,(Internet Options-Security-Custom Level-Downloads-Automatic prompting for file downloads-->Enable),allow active x content, lower security level for internet etc.. but didn't work.
I'm using Win 7, IE8.
I had the same problem and found the solution : there is a bug in Internet Explorer 8 : settings for information bar file downloads are inversed.
It says "prompt for file download" but when you set it to "disable", it prompts; and when you set it to "enable" it doesn't !
So, the solution is : go to [Internet Options|Security|Custom Level|Downloads|Ask confirmation for fiel downloads] and set it to "Enable"
Also, try MouseDown() instead of Click().. it might act differently
Try adding your domain to trusted ones. This is in Internet Options. Unfortunately I don't have english version of Windows to point you directly to those settings.
Related
I am automating test cases in which I have to upload a folder on Google drive. I am able to successfully click and upload folder by path but immediately when I click on upload button of browse windows the alert appears on top middle of the screen saying 'This will upload all files from "folderName". Only do this if you trust this site." (see attached image)
There are two buttons 'Upload' and Cancel but there is no way I can identify those element. I tried all possible approaches.
Is there any other way to handle that security alert. I found following info about the alert.
How to remove warning message in Chrome when uploading a directory
Disable alert in chrome web driver configuration
Auto accept alert.
AutoIT ( can not identify button )
Robot Keys (works) but not stable. fails the test if you will execute two test in parallel.
uploadFolder(folderToUpload, 5000);
Robot robot = new Robot();
robot.keyPress(KeyEvent.VK_LEFT);
robot.keyPress(KeyEvent.VK_ENTER);
I faced the same problem and to solve this I have used Sikuli. Sikuli will identify the pop-up as per the image. (you need to capture the screenshot of that pop-up).
Try searching for Sikuli on google and you can find lot of stuff about implementation and all. Hope this will help.
I've created a silverlight 4.0 OOB application. Inside a menu of the application I've a WebBrowser where I load some predefined webPages. The issue is that those Pages have some links that open a new Internet Explorer instance. I would like to prevent openning that new window, because my application should be the only one running in the computer. I can´t find any event that could give me the information of my app loosing the focus. I don´t know if I can also capture this in the webBrowser.
thanks for the repply!!
UPDATE:
I've found a workaround, In my case I'm sure that the default browser is Internet Explorer, so changing Internet options the problem dissapears. In Internet Options / Privacy / PopUp blocker / Settings, I've set the blocking level to "High" and have unchecked the "show notification bar" checkbox.
Sounds like some of the links in the webpage have a target="_blank" set on them.
I have a Button (or a hyperlinkbutton) in Silverlight. I want to open a file on a server share when this butto in clicked. With other words I want a new Browser Tab or Window to open showing the requested file, just like I enter the URL in the browsers addressbar:
file://C:\myfile.txt
I tried in the OnClick Method the following:
System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(#"file://C:\myfile.txt"),"_blank");
it throws an Exception (Access denied).
When I do the same with an http: page it works:
System.Windows.Browser.HtmlPage.Window.Navigate(new Uri(#"http://www.somedomain.com"),"_blank");
How can I achive the same with a file. Security can not be an issue, I have full access to that file. And please don't tell me that this is not possible... would mean we have to go back to PHP.
Silverlight runs on the client side and in by default in LOW trusted mode which dont allow application to access local file system.
For the purpose, u can try giving full trust to the silverlight application.
Firefox does not allow external URLs to link to a local resource anymore :(
I'm using VWD Express 2008 to develop a WPF Browser Application. When I start debugging, it launches the XBAP in my default browser, which is Opera. Obviously, XBAPs don't work in Opera, so I have to repeatedly right-click on the document to open in IE.
Is there any way to change the settings for PresentationHost.exe so that it always opens with IE? A registry setting, perhaps?
Setup the external program as Internet explorer path and the command line arguments as your path to xbap file within quotes, like shown below:
A simple and easy way to do this is to associate *.htm or *.html (don't remember exactly, try both) files with IE, and it will work for XBAP.
UPDATE:
Solution described above works for "Start external program option".
For "Start browser with URL" option you actually can set default browser in Visual Studio. I don't find how to set it through Tools -> Options, but you can achieve it by following steps:
In your solution explorer find a file which meant to be viewed in browser (e.g. *.htm, *.svc)
Right click on this item and choose "Browse With..."
In the opened window you'll see a list box with installed browser and one of them will be marked as default.
In the list box Choose "Internet Explorer" and click "Set as Default" (if there is no IE browser in the list just add it).
Set Default browser to IE for WPF:
Project preporties -> Debug tab properties...
Remove "-debug" only, if there in Command line arguments:(under Start Options)
Choose Start external program ( under Start Action) and give the path of "iexplore.exe"
(EX: C:\Program Files\Internet Explorer\iexplore.exe )
XBAP does work in Opera (and I can make a screenshot to prove the point). Consider updating your Opera version and/or .NET (do you have SP1?).
Check out this post on the msdn forums.
The workaround I found works OK, but requires that Firefox be your default browser:
In Firefox, open the menu Tools / Options / Downloads.
Then click on "View & edit actions" and change the action for XBAP applications to the Windows Presentation Host.
Now when I debug, Firefox receives the XBAP, but then it automatically pass it to the presentation host, which runs into IE. A bit cumbersome, because everytime a new tab gets opened in Firefox, but it's OK. It also works with F5, so you can debug.
Alternatively, you can start IE, navigate to the XBAP URL and then manually attach the debugger to the PresentationHost process (not to IE though).
Here's an interesting problem. On a recently installed Server 2008 64bit I opened IE and through the Tools -> Options I changed the homepage to iGoogle.com. Clicked okay and then clicked the homepage button. IE crashes.
Now you'd think that I could just remove iGoogle as the homepage but when I open IE it immediately goes to that page and crashes on open.
Obviously I'd prefer to find a solution to why IE is crashing on the iGoogle page but just to get IE running again I need to remove iGoogle as the homepage. Is there anyway to do this without opening IE?
Control Panel -> Internet Options
Looking at the registry, the start page seems to be stored in
HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main\Start Page
You could do it through the control panel, but you could also supply a url as a parameter to iexplore.exe.
start » run » iexplore about:blank
Two ways:
Control Panel->Internet Options
Start->Run... "%windir%\system32\inetcpl.cpl"
Not sure about IE7 on Windows Server 2008, but for IE6 the start page is stored in a registry key "Start Page" in HKEY_CURRENT_USER\Software\Microsoft\Internet Explorer\Main.
The answer is posted, but here's how you can discover the answer without having to ask 1: Set the homepage to something random ie FindMeKeyForURL.com
2: Search the registry for it
3: Extract it out and modify it, now you can deploy the .reg file