C# console application and web browser automation - c#

Using a C#.net console application, is it possible to find a Chrome window with a specific Url in its address bar, open a new Chrome tab in that window and then Automating that tab? By automating, I will then load a specific URL and then do few clicks programmatically. I tried using Selenium Web driver, but it does everything else except identifying the Chrome window with a specific URL and opening a tab.

Related

Launch new web page with System.Diagnostics.Process.Start using the same browser

I am new to c# and have created a web form using ASP.NET 4.7.2. One of my buttons links to a url, but when I am in debug mode and click on that, the new tab is opened in Microsoft Edge, which is the default browser on my machine.
Is there a way I can use System.Diagnostics.Process.Start to open a new web page in the same browser I currently am?

Login page on New window while using selenium webdriver

I was facing an issue, while I was trying to click on a link it opens a new window.
If I try manually it opens the expected link but if my automation code runs it opens the login page, and after login it routes to home page, not the actual page.
If I try manually at the browser initiated by automation code it also opens the window with the login page.
I am using selenium with C# and IE for the automation.

How do I enable javascript in webbrowser control?

I have a web application which launches a windows application using Citrix server.
Windows application has a webbrowser control.
When windows application is launched stand alone on Citrix server, web site opens in webbrowser control with no problem.
But when it is launched through my web application, the webbrowser control does not load the javascript.
It shows content blocked error. It does not fire any event and show message on web page as
"Note: Since your browser does not support javascript you must press the Continue button once to proceed
"
I tried this :
I enabled the scripting on Internet Explorer on Citrix server.
Added my application url in trusted site.
But none of the above worked for me.
Here is a nice walkthrough if you would be compelled to do something like work in IE.
https://www.whatismybrowser.com/guides/how-to-enable-javascript/internet-explorer

C# How to read the visible text off chrome webpage

I have used UIAutomation to try and get the visible text off google chrome,
however chrome doesnt allow IsTextPatternAvailable. If there a way that I can read the text off a chrome web page using C# that doesnt depend on apps like selenium and not using chrome extensions...

I want to get the url from all tabs in Chrome and IE from C# windows form button click

I want to get the URL from all open tabs. I have searched on Google but could not find any luck. I want to read and log the URL from all open tab from Chrome And IE.
I am using C# windows form application.
Thanks in Advance..
Umang
I understand what you need to do but I would be surprised if IE and Chrome would expose the tabs and the urls in a simple and similar way to external applications, I think the way to go is to build a Chrome extension and an IE plugin or Addin to get those information while running within the browser scope, then you can send this info to an external application or to a web service etc... you will find a way to get the info out once you have got this url list inside your own code running with the browser.
see here for some starting point / ideas
Chrome extensions:
http://code.google.com/chrome/extensions/index.html
IE development:
http://msdn.microsoft.com/en-us/library/bb250436(VS.85).aspx

Categories