awesomium

Use embedded resource like WebControl.Source in Awesomium

心已入冬 提交于 2020-01-17 08:14:06
问题 How I can get URL of embedded resource(.html) in my app which I can use like a value of WebControl.Source? Or what better way to open embedded resources? 回答1: Embedded Resources do not have an URL instead the can be referenced with their namespace. Read about how to use embedded Resources: http://www.codeproject.com/Articles/3089/Understanding-Embedded-Resources-in-Visual-Studio There are also multiple questions and answers for this on stackoverflow: How to read embedded resource text file 来源

Awesomium, change useragent and referrer

心不动则不痛 提交于 2020-01-04 05:52:13
问题 I just started to use awesomium. I wanted to understand how to change user-agent and referrer. i need for example to initialize 5 istance o awesomium webcontrol and for each of them i need different user-agent and different referrer. this is my simple code private void newbrowser() { browser = new Awesomium.Windows.Forms.WebControl(); browser.Paint += browser_Paint; browser.Location = new System.Drawing.Point(1, 1); browser.Name = "webControl"; browser.Size = new System.Drawing.Size(1024, 768

Returning value to C# function from Javascript not working in Awesomium

本秂侑毒 提交于 2019-12-25 05:53:21
问题 My previous question went unaswered; I've made some progress in narrowing down the issue, but I only have a week left in my summer student work term and I would like to resolve this issue before I go. I currently want to return a value from a Javascript function back into C# in Awesomium. Below is the implementation of how I do it in my C# application. private void WebViewOnDomReady(object sender, EventArgs eventArgs) { webView.DomReady -= WebViewOnDomReady; webView.CreateObject("jsobject");

How to Implement ResourceInterceptor Awesomium 1.7.1

馋奶兔 提交于 2019-12-24 00:57:18
问题 so, i've seen this question on this thread Awesomnium Post Parameters basically i want to know how i can implement the Resource Interceptor, cause i can't find it.. i'm also using c# and i search through the object browser and didn't find the class... this is my code.. more or less is the same as thread above public class CustomInter : ResourceInterceptor { protected override ResourceResponse OnRequest(ResourceRequest request) { request.Method = "POST"; request.AppendUploadBytes("klik_login=1

Awesomium Winforms does not work in VMWare

旧城冷巷雨未停 提交于 2019-12-23 17:22:39
问题 We have an application that runs Awesomium 1.7.5.1 great on our physical machines but will fail on virtual machines. The one "gotcha" is running on a virtual machine with a remote debugger attached seems to somehow make Awesomium work. 回答1: You need to setup at least 2 processor cores in your vm when using Awesomium 来源: https://stackoverflow.com/questions/30591261/awesomium-winforms-does-not-work-in-vmware

Awesomium how save a loaded image without redownload it

廉价感情. 提交于 2019-12-23 04:44:05
问题 How can copy or save a loaded image inside Awesomium browser to local disk without redownload it? There is a method for download an image : http://docs.awesomium.net/html/M_Awesomium_Windows_Controls_WebControl_SaveImageAt.htm But it has two problems : It redownload image. It shows a pop-up to save image and i don't want it. Also every way in javascript redownloads goal image! What is the solution? How can we grab the downloaded image from cache folder? 回答1: You can try something like this: /

How to login to google accounts using awesomium in C#.net?

十年热恋 提交于 2019-12-22 09:58:05
问题 I'm learning Awesomium and following is the code in which I'm trying to login to https://accounts.google.com. I'm successfully able to set the login and password field values in the page, but not able to submit the login form, neither does the click works. Can anyone help me how to login? using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Awesomium.Core; namespace Awesom { class Program1 { public static void Main(String[]

Loop through Awesomium JSObject

徘徊边缘 提交于 2019-12-20 04:04:28
问题 I'm making an C# Windows Form Application with an Awesomium webbrowser inside it. I'm trying to get some rows from an table and parse them to an array. The JSPart is running inside the browser fine. Here's the code that i use inside C#: JSObject villageRows = view.ExecuteJavascriptWithResult("document.getElementById(\"production_table\").getElementsByTagName(\"tbody\")[0].getElementsByTagName(\"tr\");"); if (villageRows == null) { return; } That returns now 2 tr rows inside Chrome, but that

Can I call application methods from JavaScript in Awesomium?

僤鯓⒐⒋嵵緔 提交于 2019-12-17 17:34:45
问题 I've scoured the internet looking for an answer, but I must be asking the wrong question. I have a C# winforms app with an Awesomium web control. Am I able to call methods defined in the app from javascript in the page that loads? If so, how? (sample js code would be greatly appreciated). Thanks! 回答1: The approach depends on which version of Awesomium you're using. There's been a bit of a change of how this is done in the upcoming version 1.7 (currently at 1.7 RC3) and how it was done before.

How to get HttpOnly cookies from awesomium?

一笑奈何 提交于 2019-12-13 07:35:05
问题 I want to get ALL cookies from the site, but most of them are HttpOnly. JS does not work: var cookie = webControl.ExecuteJavascriptWithResult("document.cookie;"); How to get HttpOnly cookies? 回答1: why you're trying to get Cookies back from Javascript? ... the best opinion to get all Headers (including Cookies) is to use Awesomium with a Proxy written also in C# ... Wiki: ProxyConfig http://docs.awesomium.net/html/P_Awesomium_Core_WebPreferences_ProxyConfig.htm Github C# Proxy: https://github