I have created a website, with a link button that opens a link in IE, and when I run the program locally,
Process.Start("iexplore.exe", myUrl)
works just fine.
However - when I have published my website and run the program from the webserver, every click on my link button will open IE - on the webserver...
Is there a way to make a specific browser open on the local machine?
Related
I'm using Selenium for a web automation task that would download files and only close the web driver when the downloads have finished. I have implemented a way to scan the downloads in progress for Chrome and Firefox by opening a new tab, going to their respective downloads manager URLs and finding web elements of all the downloads of the current web driver instance. For Chrome the downloads manager URL is: 'chrome://downloads/' and for Firefox: 'about:downloads'.
Is there a similar way I can do this for Internet Explorer? The only downloads list I've seen for IE is a separate window which I cannot access with Selenium.
I'm not sure if this will work for all downloads, but here is the idea:
Read the content of the folder where the downloads are stored
If the file size is zero 0kb, the download is still in progress.
Tested with a 5GB file on http://www.engineerhammad.com/2015/04/Download-Test-Files.html
I need, for testing purpose, to disable download prompting bar in IE9 (that asks for opening or saving the file), otherwise I cannot test a feature of my app that lets to download a file.
There are download managers that allow to do it, I am wondering where I may put my hands (which Window's registry) in order to remove this download prompting bar.
You can try to switch to new window and close it or execute following code.
driver.switchTo().alert().dismiss();
You don't say which language you are using, but I was able to do this using the following Ruby code.
Note that it does not touch the registry, as asked in your question, but uses the keyboard to interact with the IE9 download bar. It does not disable the download bar altogether, but effectively does the same thing by getting IE to save the file once a download has been invoked.
Selenium can't see the IE9 download bar, so you can't interact with it using Selenium.
require 'win32ole'
#assuming download has started, and IE9 download window is now visible
if $browser = "IE" then
wsh = WIN32OLE.new('Wscript.Shell')
wsh.AppActivate('My webpage - Windows Internet Explorer')
sleep 1
wsh.SendKeys('%s;') # $browser.send_keys #doesn't work - because IE download window is not on the web page.
end
I'm executing automated test scripts in some URL in Internet Explorer.
If I open the same link on a new tab, the control gets transferred to the newly opened link that is active in the browser.
How to stop this and execute tests in the first browser instance?
I am making a desktop search app. I need a way to set the web browser target to Google Chrome. I.e., if a person clicks a button in my app it will open Chrome with the website instead of Internet Explorer.
run the chrome exe with a url as the first arg
chrome.exe xkcd.com
So something like...
Process.Start("pathToChrome\\chrome.exe", "xkcd.com")
How Do I Change Firefox Homepage In VB2011 Code
I want to change the url homepage of the firefox browser by running that EXE file
is this possible
If you want to change the Firefox's home page form a program running on the user's computer, you have to edit the prefs.js file and create a new line like user_pref("browser.startup.homepage", "http://www.example.com/");.
Beware that if there are multiple browser.startup.homepage entries every entry will be opened in a new tab when the browser starts up, and that the modification must be done when Firefox is closed, otherwise the changes will be lost.