Run Cefsharp as Chrome - c#

Is it possible to use CefSharp as 'Chrome'? I know, it is a kind of Chrome, but webpages doesn't see CefSharp as Chrome.
The story:
I want to embed WhatsApp Web with CefSharp, but Whatsapp says: Only Chrome supported. Are there any possibilities to 'fake' Chrome?

WhatsApp Web checks for browser capabilities. It fails when checking for navigator.getUserMedia. To enable WebRTC audio/video you need to set the --enable-media-stream flag. Set it programmatically through the CefSettings.CefCommandLineArgs option. For an example see CefSharp.Example/CefExample.cs.

Related

Selenium WebDriver C# - Bypass Chrome Authentication Required dialog

I have an issue with Selenium WebDriver dealing with Google Chrome Authentication dialog box. I have search the net for 2 weeks but I can't get a definite solution to it.
I have a constraint, which is Selenium WebDriver will run in a remote Windows 2012 R2 server under user SYSTEM, hence running the background WITHOUT Chrome UI displayed.
Due to the constraint above, AutoIT doesn't works as it requires UI to handle the events. Driver.SwitchTo().Alert() doesn't seem to work too as it doesn't capture the alert at all (Some said it works on IE only).
Driver.Navigate().GoToUrl("https://username:password#url.com") doesn't work as well as my website is using SSO Login. It will first navigate to https://www.landingsite.com then redirected to https://authenticationrequired.com/daM2Sc, which the URL for the SSO Login is randomize every single time, so I couldn't bypass the Authentication dialog directly.
I wanted to use a workaround by capturing the authentication URL by using Driver.Url and the add my username and password infront of the URL, but then because of the prompted authentication dialog box, the driver fails to capture the URL and throws a timeout exception.
Some said by adding URL to trusted site would stop the dialog box being prompted but it doesn't work for some reason. It only works in IE.
Is there any other solution to this?
I lost a week to try do that, and when i can do, i think it's amazing. Java code here:
WebDriver driver = new ChromeDriver();
driver.get(user:pass#URL/);
and you must encode user and pass. Link encode: https://meyerweb.com/eric/tools/dencoder/
My chrome Version 65.0.3325.181 (Official Build) (64-bit)

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...

URL Scheme launched program has some features blocked by Chrome

I have a link in an asp.net mvc 5 page that references a custom URL scheme. The executable launches just fine. The program does access the internet and when launched from Chrome the video feature will not connect. It works fine in IE. Basically the executable is a WinForms app that uses Vidyo for video conferencing. I can also simply double click the app and it works fine. My question is why would an executable launched from Chrome (via URL scheme) have features blocked? What security account does Chrome use? Thanks for any help.
The difference between IE and Chrome is that in IE, there is a Vidyo plugin that is being used, whereas in Chrome there is no plugin and would use WebRTC for video streaming.

Detect browser URL

Is there a way for a standard C# desktop app to detect the URL that the browser is going to navigate to, and possibly prevent it from doing that? An example would be all those download managers that pop up when I click a link in the browser and prevent browser's default action from occurring.
you can not access to internet browsers from winform projects but
you can access if you have a plug-in app. for browsers.
Develop a plug-in app. and communicate with your winform app. like internet download manager app.
here is expamle for IE add-ons
IE add-on express
for chrome
Google dev guide
hopefully helps it.

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