awesomium

Awesomium Getting and clicking a Tags attribute

邮差的信 提交于 2019-12-13 04:44:09
问题 I'm having an issue clicking a button by the tag name and attribute. I can click it using the buttons class with the following: public void Event(string getElementQuery, string eventName) { Control.ExecuteJavascript(@" function fireEvent(element,event) { var evt = document.createEvent('HTMLEvents'); evt.initEvent(event, true, false ); // event type,bubbling,cancelable element.dispatchEvent(evt); } " + String.Format("fireEvent({0}, '{1}');", getElementQuery, eventName)); } private void Reload

Javascript click a class button

梦想的初衷 提交于 2019-12-12 01:59:54
问题 So this is just a small personal project that I'm working on using awesomium in .net. So in awesomium I have this browser open and all that and I want to click this button that has this code. <a class="buttonright" > Bump </a> But considering it's a class and not a button I'm having trouble finding a way to "click" it. My plan is to use javascript in awesomium to click it but maybe I'm approaching this from the wrong direction? Thanks 回答1: Update: After a lot of comments (back and forth) I

Awesomium Wpf WebControl read json response from wcf service

十年热恋 提交于 2019-12-11 18:06:27
问题 What I want to do is simply serve the Json response from a Wcf service to the Wpf WebControl. I have tested the Wcf service as working and I can see the Json response in the REST client. I have basically tried two approaches (thanks to the generous developers who share their code here):- Resource Interceptor How to hide the cursor in Awesomium Below is how my ResourceInterceptor constructing the ResourceResponse. From the docs ResourceResponse is simply a wrapper around a raw block of data

Awesomium Displaying Adobe Reader plugin outside of browser window

﹥>﹥吖頭↗ 提交于 2019-12-11 14:36:33
问题 I've also asked this question on the Awesomium question/answer deal (here), but have gotten no reply, so I am asking here hoping that someone here has dealt with the issue. Whenever I render a PDF in an iframe, it shows as a separate app in a window. I don't need it to be displayed in an iframe, or even visible at all, I just need it to launch the print window, so that filled out PDF can be printed... please help... (I am currently using v 1.7.1 of Awesomium, though I had the same problem is

Saving Image Using Awesomium

百般思念 提交于 2019-12-11 12:12:45
问题 I'm using Awesomium .NET 1.7.0.5 and am trying to retrieve an image element from page and save it into memory/disk. In the earlier versions, this can be achieved by calling webView.Render(). However I noticed they have removed this in the recent releases. Is there any workaround for this? Note: I do not want to redownload the image, so retrieving the image URL then download it again is not an option. 回答1: You can use something like: ((BitmapSurface) view.Surface).SaveToPNG("c:\\temp\\Page.png

The type initializer for '<Module>' threw an exception when try to embed Awesomium dlls

时光总嘲笑我的痴心妄想 提交于 2019-12-11 11:20:47
问题 I'm Trying to embed Awesomium into my project executable file. In the documentation of Awesomium, they said that set the target platform of your project to X86 . Is that mean there is only Unmanaged32Assemblies available? I add this line to FodyWeaver.xml file: <Costura Unmanaged32Assemblies='Awesomium.Core|Awesomium.Windows.Forms'/> But I got an exception that says: System.TypeInitializationException was unhandled Message: An unhandled exception of type 'System.TypeInitializationException'

Awesomnium Post Parameters

隐身守侯 提交于 2019-12-11 10:34:49
问题 currently i am working with Awsomnium 1.7 in the C# environment. I'm just using the Core and trying to define custom post parameters. Now, i googled a lot and i even posted at the awsomnium forums, but there was no answer. I understand the concept, but the recent changes just dropped the suggested mechanic and examples. What i found: http://support.awesomium.com/kb/general-use/how-do-i-send-form-values-post-data The problem with this is, that the WebView Class does not contain

Awesomium Webview Surface to Byte Buffer or PictureBox

大憨熊 提交于 2019-12-08 14:29:45
I begun to develope in C#, and I'm trying to convert a surface to a byte buffer or to a Picture (to convert after to a byte buffer too). I saw in other question this code: string fileName = Path.GetTempFileName(); webView2.Render().SaveToPng(fileName); byte[] bytes = File.ReadAllBytes(fileName); File.Delete(fileName); MemoryStream ms = new MemoryStream(bytes); But, a webview don't have Render(), and he don't say what libraries I need to import. I stop here: var view = (WebView)WebCore.Views.Last(); WebCore.Update(); BitmapSurface surface = (BitmapSurface)view.Surface; surface.?? There have

Awesomium Webview Surface to Byte Buffer or PictureBox

邮差的信 提交于 2019-12-08 06:46:05
问题 I begun to develope in C#, and I'm trying to convert a surface to a byte buffer or to a Picture (to convert after to a byte buffer too). I saw in other question this code: string fileName = Path.GetTempFileName(); webView2.Render().SaveToPng(fileName); byte[] bytes = File.ReadAllBytes(fileName); File.Delete(fileName); MemoryStream ms = new MemoryStream(bytes); But, a webview don't have Render(), and he don't say what libraries I need to import. I stop here: var view = (WebView)WebCore.Views