Jump to content

salvadordf

Members
  • Content Count

    27
  • Joined

  • Last visited

  • Days Won

    3

Everything posted by salvadordf

  1. salvadordf

    My new project : WebView4Delphi

    I just published a new project in GitHub called WebView4Delphi. WebView4Delphi allows you to embed Chromium based web browsers in your Delphi or Lazarus applications using the WebView2 runtime. It uses the latest stable version of the WebView2 nuget package 1.0.1054.31. I used many of the tricks I learned creating CEF4Delphi and you will notice many similarities if you used it. I still have to write the documentation but you can build the available demos to see it working in VCL, FMX and Lazarus apps. There are a few things pending like the "windowless mode". It's being distributed with a simple MIT license so anyone can do whatever s/he wants with it. https://github.com/salvadordf/WebView4Delphi
  2. salvadordf

    My new project : WebView4Delphi

    In case there are extra problems read this.
  3. salvadordf

    My new project : WebView4Delphi

    The BPL files should be created in $(BDSCOMMONDIR)\Bpl and not in the WebView4Delphi\packages directory. Perhaps the "Package output directory" option is not set to $(BDSCOMMONDIR)\Bpl Open the Tools -> Options... menu option and then select the "Environment options -> Delphi options -> Library" node in the left tree view. There you can check the "Package output directory" value. If you can't modify that setting try adding the WebView4Delphi\packages directory to the search path.
  4. salvadordf

    My new project : WebView4Delphi

    Build WebView4DelphiVCLRTL.bpl, WebView4DelphiFMXRTL.bpl, WebView4DelphiVCL_designtime.bpl and WebView4DelphiFMX_designtime.bpl individually (in that order) or download the latest WebView4Delphi version from GitHub. I recently fixed a project order issue in the project group file thanks to the information on this thread. This Wiki article has all the details to install WebView4Delphi in Delphi.
  5. salvadordf

    WebUI4Delphi available at GitHub

    I just made public the WebUI4Delphi open source project at GitHub. WebUI4Delphi is a WebUI wrapper, which allows you to use any web browser as a GUI, with Delphi in the backend and HTML5 in the frontend. WebUI doesn't embed a web browser. It just connects your Delphi application with the installed web browser using a fast protocol so you can use HTML5 as part of the GUI. WebUI4Delphi can be used in 64 bit Delphi applications for Windows. Linux and MacOS support needs testing. There are several VCL, FireMonkey and console demos. https://github.com/salvadordf/WebUI4Delphi
  6. salvadordf

    WebUI4Delphi available at GitHub

    I don't know Sciter but after reading a few things it looks similar. You should ask the WebUI developers to get a better answer but Sciter seems to have a lot more features.
  7. salvadordf

    TWebBrowser Edge Engine Unavailable

    Yes. CEF4Delphi works on Windows, Linux and macOS. There are some unresolved issues in Linux but it works : https://github.com/salvadordf/CEF4Delphi/issues?q=is%3Aissue+is%3Aopen+label%3ALinux
  8. salvadordf

    Call for Delphi 12 Support in OpenSource projects.

    FYI : I'm not a beta-tester but the latest Skia4Delphi code available at GitHub includes {$IF CompilerVersion >= 36} several times.
  9. The WebView2 feedback repository shows similar problems. I just tried to modify the TabbedBrowser demo to create the browser while WVWindowParent1 was not visible and the browser was created correctly. The navigation events worked even while the browser wasn't visible. Perhaps Microsoft fixed this recently.
  10. salvadordf

    Where is the link to register to the forum?

    Some suggestions : Use a custom captcha when registering new users. Some forum plugins allow you to create custom questions or things like that. Don't use any version of Google recaptcha. All of them were cracked ages ago. Some forums allow you to moderate the first messages of new users. This gives you some extra work but it blocks all spammers that registered manually. Some forums have plugins that block new users that try to use known spammers IPs, email addresses, etc.
  11. salvadordf

    How to clear the cache in TEdgeBrowser

    You can use these DevTools methods : Network.clearBrowserCache Storage.clearDataForOrigin If you decide to switch to WebView4Delphi then you can simply call : TWVBrowser.ClearCache TWVBrowser.ClearDataForOrigin
  12. salvadordf

    Automating Delphi FMX based application

    Try using Sikulix.
  13. salvadordf

    TWebBrowser: Remove Scrollbars not working

    Besides the JavaScript, HTML or CSS solutions you can also use the Emulation.setScrollbarsHidden method in the DevTools protocol: https://chromedevtools.github.io/devtools-protocol/tot/Emulation/#method-setScrollbarsHidden If you use CEF4Delphi use this code : procedure TForm1.HideScrollbars; var TempParams : ICefDictionaryValue; begin try TempParams := TCefDictionaryValueRef.New; TempParams.SetBool('hidden', True); Chromium1.ExecuteDevToolsMethod(0, 'Emulation.setScrollbarsHidden', TempParams); finally TempParams := nil; end; end; If you use WebView4Delphi use this code : procedure TForm1.HideScrollbars; begin WVBrowser1.CallDevToolsProtocolMethod('Emulation.setScrollbarsHidden', '{"hidden":true}'); end;
  14. salvadordf

    Click button from WVBrowser

    Run the MiniBrowser demo and navigate to that web page. Then click on the top-right button and open the DevTools window. Switch to the Console tab, type your JavaScript code and press enter to read the error message : document.getElementById("linkRefresh").click(); The problem could be something as simple as a syntax error or that page could have multiple documents because it could have several frames. In any case, debugging the JavaScript code in the console tab is the best solution before calling WVBrowser.ExecuteScript
  15. salvadordf

    Is there a component can help me automate web actions ?

    Try using a CEF4Delphi browser in off-screen rendering (OSR) mode. That mode allows you to simulate mouse, touch and keyboard events.
  16. salvadordf

    My new project : WebView4Delphi

    I'm not sure if it supports Delphi 6 but I would also try Wke4Delphi : https://gitee.com/LangjiApp/Wke4Delphi
  17. salvadordf

    My new project : WebView4Delphi

    I'm sorry but WebView4Delphi requires at least Delphi 7. If you need to test this component you can also use Lazarus or Delphi Community Edition.
  18. salvadordf

    TEdgeBrowser : "Unsafe attempt to load URL"

    It's not easy to use Chromium command line switches with TEdgeBrowser. Consider using WebView4Delphi instead and set GlobalWebView2Loader.AllowFileAccessFromFiles to true. You can also use the VirtualHostBrowser demo as a template for your application. It maps a local directory to a custom domain to load files from the hard drive.
  19. salvadordf

    Proxy for TEdgeBrowser/Webview2?

    Sorry for the shameless promotion but BriskBard allows you to set any proxy.
  20. salvadordf

    Proxy for TEdgeBrowser/Webview2?

    The WebView2 API doesn't have any interface to use custom proxy settings but you can use the Chromium command line switches. If you use TEdgeBrowser then you will have to create an ICoreWebView2EnvironmentOptions instance with those switches and pass it as a parameter in CreateCoreWebView2EnvironmentWithOptions. However, if you decide to use WebView4Delphi then all this is already implemented and you only have to set the GlobalWebView2Loader.ProxySettings properties. At this time, any WebView2 wrapper will only allow you to set the proxy settings once. If your application needs to change the proxy settings multiple times at run-time then you need to use CEF4Delphi.
  21. salvadordf

    My new project : WebView4Delphi

    I haven't checked that. Sometimes this is just the result of some temporal issue in the Google servers and they fix it but sometimes this a deliberate safety measure from Google against all embedded browsers. Try using a modern Firefox user agent string.
  22. salvadordf

    GUI automation tool for Firemonkey apps ?

    I've been asked to find a GUI automation tool for a Firemonkey desktop application for Windows. There're several tools that work for VCL applications but I can't find anything for FMX apps. Many well known tools can't find the FMX controls and they can only simulate mouse and keyboard events, compare screenshots, OCR, etc. All I could find is this StackOverflow question : https://stackoverflow.com/questions/30197921/how-can-i-automate-delphi-firemonkey-ui-testing-without-access-to-source-code That question has 2 suggestions : - Use the "FireMonkey Accessibility Package". - Build a "Test harness". The "FireMonkey Accessibility Package" for Delphi 10.2 is here : https://cc.embarcadero.com/Item/30780 It seems to work with Delphi 10.3 if we apply this fix : https://quality.embarcadero.com/browse/RSP-25532 My question to all of you is this : What GUI automation tool do you use for Firemonkey applications? Are we limited to building "Test harnesses" or using the "FireMonkey Accessibility Package"? Thanks!
  23. salvadordf

    CEF4DELPHI - How to get permisions to use Webcam and Microphone ?

    Check these points : Assuming you use Windows 10, check if you can make that camera work with the "Camera" app. Install Chrome or Chromium 84. Ideally you should try to install 84.0.4147.89 and make the camera tests with the latest CEF4Delphi version from GitHub. Test your camera with Chrome/Chromium on webcamtoy.com. Open the SimpleBrowser2 demo and add GlobalCEFApp.EnableMediaStream := True; before the GlobalCEFApp.StartMainProcess call in the DPR file. Connect your camera, build the demo and test it in webcamtoy.com. If your camera works on a similar Chrome version then it should work with the SimpleBrowser2 demo or any other CEF application.
  24. salvadordf

    CEF4DELPHI - How to get permisions to use Webcam and Microphone ?

    After reading your code again I see that you're disabling the GlobalCEFApp.MultiThreadedMessageLoop property. It's recommended that Windows applications keep GlobalCEFApp.MultiThreadedMessageLoop enabled. Only in some cases you can consider disabling it but then you should use a "External Message Pump".
  25. salvadordf

    CEF4DELPHI - How to get permisions to use Webcam and Microphone ?

    Hi, I added GlobalCEFApp.EnableMediaStream := True; to the DPR file of the SimpleBrowser2 demo and I could see the video from my cheap webcam in webcamtoy.com About the registration issue, send me a PM with your username and I'll activate it manually.
×