Now I want to do automated web testing with selenium in Specflow, and I have several credentials to test. The question is How to switch domain to log in chrome browser with C# code in selenium. I have tried the solution in this But I found the new chromedriver() cannot be modifiied. I can do manually change the domain by shift and right click chrome browser to run as a different user, but I can't solve it automaticaly.
Related
I am testing a chat functionality on the user interface.
so I will be logging in as user 1 from IE and log in in as user 2 on Firefox.
So I want to know what is the syntax to do this in telerik test file using c#.
I have checked online and have found various links for cross browser testing which is mainly running the same test on different browser.
But I want to launch a new browser from a test script
Can someone please share some inputs and any helpful links?
thanks
you could try something as simple as this
System.Diagnostics.Process.Start("firefox.exe", "http://www.msn.com");
if firefox is not added to your %Path% then fully qualify the location of where the .exe is like this
System.Diagnostics.Process.Start(#"C:\Program Files\Mozilla Firefox>firefox.exe", "http://www.msn.com");
I have a ASP.Net application .When user clicks a link, his username and password for a third party website should auto-populate to that website.
I have seen Selenium web drivers can do this, but only on the local machine(server).
Is it possible to automate this on client browsers?
I do not think you can do this at client side that will be security issue then. Any way once you open the third party website on a click from your website either that new website loads independently or loads inside a iFrame inside your application depending upon your inmplementation in both cases you can not access anything in the site using the Javascript or something else. And Selenium is not at all possible as it is Java you can not run it in a clients machine.
I would need to start a chrome session login to a page then open a url and close chrome.
I could do this in ie but the page is not ie. optimised. I dont seem to be able to automate firefox or chrome . Any ideas ?
ta,
gabor
Any reason why the page needs to be accessed by a web browser? It would be easier to create a web request in c# and access the page that way. Unless you need this for some kind of integration testing.
You can use Selenium. It has drivers for IE, firefox and chrome. If you need a tutorial how to start you can watch: http://www.youtube.com/watch?v=y9iFvpK10fw
I am using the Selenium Firefox web driver and attempting to start an existing profile which I have created specifically for Selenium.
Firefox starts up with the correct profile, but the web driver shows as disabled in the extensions and therefore Selenium fails to connect to the web driver. How can I make sure that it starts with the extension enabled?
I would post code, but the code is working properly and the correct profile is used. This is a Firefox configuration issue I believe. If I let Selenium create a temp profile it works fine, but I need access to one of the extensions that I have setup as well as the configuration for that extension. I saw that it is possible to load extensions through code but I don't know how I could load an identical configuration.
I wanted to make an application wherein you specify the name of the websites, your username and password and that application automatically logs in to all your accounts in the specified websites. I have done this using windows form application, using a web browser. But i wanted my application to open all these websites in chrome and log it in there. Plz Help
I'd check out the chrome API failing that
Look into getting a handle to the window through window API calls
But why not just a chrome extension?!? Miles simpler
Have a look at Selenium WebDriver
Doing a quick Google search for "chrome C# api" turned up a number of results I think you may find relevant.
I thought the following were particularly promising, if you're willing to accept a few concessions:
Automating Chrome Browser from C#
ChromeDevTools; a C# Library to interact with Chrome's Developer Tools
Chrome Debugging API