Cefsharp Flash plugin not supported - winforms

I'm trying to get some flash content working within CefSharp v45. If I navigate to: https://helpx.adobe.com/flash-player.html it tells me
Flash Player is pre-installed in Google Chrome, but not enabled.
How do I enable it?

Typically you would install the system wide PPAPI version of Flash, as outlined
A system-wide installation of Pepper Flash that will be automatically discovered and loaded by CEF on Windows and OS X can be downloaded from https://get2.adobe.com/flashplayer/otherversions/ (choose "FP for Opera and Chromium -- PPAPI") in Step 2). To enable use the system-wide installation pass the --enable-system-flash command-line argument.
https://bitbucket.org/chromiumembedded/cef/issues/1586/add-pepper-flash-plugin-support#comment-16898332

So this is how i solved it:
Dim settings As New CefSettings
settings.CachePath = "cache"
settings.CefCommandLineArgs("enable-system-flash") = "1"
settings.CefCommandLineArgs.Add("ppapi-flash-path", "C: \Program Files (x86)\Google\Chrome\Application\47.0.2526.111\PepperFlash\pepflashplayer.dll") ' //Load a specific pepper flash version (Step 1 Of 2)
CefSharp.Cef.Initialize(settings)
' This call is required by the designer.
InitializeComponent()
Make sure InitializeComponent() (for the form) is called after applying the settings.

Related

WebkitGtk application is not loading file URL

I am building a kiosk application using webkitgtk on the raspberry pi 4.
This application will not be connected to the internet and all the html,css, javascript for the UI are all located on the local filesystem.
I am using buildroot to setup the Linux system, starting with the pi 4 defconfig provided in buildroot.
I have enabled all the packages needed to get webkitgtk running.
Also, the kiosk application has been tested on my desktop, using the same software stack and it works
However, when i try to launch the application on the raspberry pi, a blank page pops up. I have played around with the WebKitWebSettings object associated with my WebKitWebView by enabling local file access. It still shows up a blank screen.
Also included in my pi4 application bundle is a simple gtk3+ application. This launches successfully!
I will really appreciate some pointers as to why this is happening as i have sort of reached a dead end
UPDATE
I enabled the MiniBrowser app that comes with the Webkitgtk package.
Entering the local url, The page does not load. It only gives me a message at the top saying "Successfully downloaded".
It seems to be treating my input as a download
UPDATE 2
After some more experimenting, i was finally able to get webkitgtk working on the pi 4.
The problem seems to originate from using the webkit_web_view_load_uri() api.
It does not seem to recognize my html document as a web page.
I got around it using the webkit_web_view_load_html() call. This included some hacks by first reading in the contents of the html doc into a character buffer, and passing it to webkit_web_view_load_html().
You also have to provide a base path to this function call to be able to resolve all the urls (scripts, css, images etc) in your html document.
Another problem i haven't been able to work around is, SVG images are not loading in webkitgtk. I have used jpg formats and they work. I suspect this my be due to a configuration switch in building webkigtk
It's hard for me to figure out what might be happening without having access to your environment and settings. My gut feeling is that pages are showing blank because perhaps some shared libraries are missing. You can check that with:
$ ldd WebKitBuild/GTK/Release/bin/MiniBrowser
I am using buildroot to setup the Linux system, starting with the pi 4 defconfig provided in buildroot.
There's a buildroot repository for building WPE for RPi. WPE (WebPlatform for Embeded) is like WebKitGTK but doesn't depend on GTK toolkit. Another important difference is that WPE runs natively on Wayland.
If you're interested in having a webapp embedded in a browser running in a device with limited capabilities, WPE is a better choice than WebKitGTK. The buildroot repo for building WPE for RPi is here:
https://github.com/WebPlatformForEmbedded/buildroot
There's is also this very interesting step-by-step guide on how to build WPE for RPi3:
https://samdecrock.medium.com/building-wpe-webkit-for-raspberry-pi-3-cdbd7b5cb362
I'm not sure whether the buildroot recipe would work for RPi4. It seems to work for all previous versions, so you might be stepping in new land if you try to build WPE on RPi4.
If you have an RPi3 available I'd try to build WPE for RPi3 first, and make sure that works. Then try for RPi4.

JMeter Webdriver Sampler it opens the IE 11 browser but won't go to the URL

trying to run the Jmeter selenium script, it is launching IE11 browser with some port number and blank page, not able to go to the URL.
OS: windows7
Browser: IE11
if i run the same script in eclipse working with selenium and IE11 launching correctly.
WDS.sampleResult.sampleStart()
WDS.browser.get('http://jmeter-plugins.org')
WDS.sampleResult.sampleEnd()
Error in jmeter log:
JMeterThread: Test failed!
org.openqa.selenium.WebDriverException: session null does not exist (WARNING: The server did not provide any stacktrace information)
Internet Explorer 11 requires some additional configuration:
The IEDriverServer exectuable must be downloaded and placed in your PATH
On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".
Additionally, "Enhanced Protected Mode" must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.
The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.
For Windows 10, you also need to set "Change the size of text, apps, and other items" to 100% in display settings.
For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates. For 32-bit Windows installations, the key you must examine in the registry editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE. Please note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Important: Inside this key, create a DWORD value named iexplore.exe with the value of 0.
So double check your configuration, if you are able to run your Selenium test using other client language - you should also be able to do it from JMeter.
If you still receive errors update your question with screenshots of the InternetExplorer Driver Config (all non-default settings) and full contents of your jmeter.log file.
I would also recommend checking out The WebDriver Sampler: Your Top 10 Questions Answered article for the most common queries explained.

IE11 Selenium WebDriverException: Failed to navigate. (org.openqa.selenium.WebDriverException ...IWebBrowser2::Navigate2() failed

I am new to automated testing and, though my Selenium tests are running on Chrome and Firefox, they are not running on IE11. I did all the checks I detail below, but I keep on bumping into this error:
org.openqa.selenium.WebDriverException: Failed to navigate to http://myapp. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed.
I did first the required configuration as in
https://code.google.com/p/selenium/wiki/InternetExplorerDriver#Required_Configuration) .
I have tried editing my registry as suggested at In IE: org.openqa.selenium.WebDriverException: This usually means that a call to the COM method IWebBrowser2::Navigate2() failed
to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\MAIN\FeatureControl\FEATURE_HTTP_USERNAME_PASSWORD_DISABLE add a new DWORD value with the name iexplore.exe and the value 0, as described by https://stackoverflow.com/users/80779/lordofthepigs
I also tried introducing the piece of code suggested by https://stackoverflow.com/users/4210466/karunakar-sapogu :
new_window = self.driver.window_handles[1]
self.driver.switch_to_window(new_window)
But I seem not to be introducing it right because I got java errors.
Has anyone solved this problem in Java? Could you give me step by step instructions?
1) Are you sure that is your IEdriver instance run?
2) Did you use IEdriver x64 or IEDriver x86?
Even if you use x64 windows, in most cases you use internet exlporer x86. Please, try x86 driver and try to reproduce such behavior
It worked! Thanks so much. The problem was that I had the 64 bit version. By replacing it with a 32 bit version, my code worked (I have the driver in System32, to bypass modifying the path)
System.setProperty(webdriver.ie.driver", "C://Windows/System32/IEDriverServer.exe");
driver = new InternetExplorerDriver();
baseUrl = "http://mysite";
driver.manage().timeouts().implicitlyWait(30, TimeUnit.SECONDS);
This error message...
org.openqa.selenium.WebDriverException: Failed to navigate to http://myapp. This usually means that a call to the COM method IWebBrowser2::Navigate2() failed
...implies that the IEDriverServer was unable to initiate/spawn a new Browsing Context i.e. Internet Explorer Browser session as a COM object.
Required Configuration for Internet Explorer Driver
The Required Configuration of Internet Explorer Driver clearly mentions:
The IEDriverServer exectuable must be downloaded and placed in your PATH.
On IE 7 or higher on Windows Vista or Windows 7, you must set the Protected Mode settings for each zone to be the same value. The value can be on or off, as long as it is the same for every zone. To set the Protected Mode settings, choose "Internet Options..." from the Tools menu, and click on the Security tab. For each zone, there will be a check box at the bottom of the tab labeled "Enable Protected Mode".
Additionally, Enhanced Protected Mode must be disabled for IE 10 and higher. This option is found in the Advanced tab of the Internet Options dialog.
The browser zoom level must be set to 100% so that the native mouse events can be set to the correct coordinates.
For Windows 10, you also need to set Change the size of text, apps, and other items to 100% in display settings.
For IE 11 only, you will need to set a registry entry on the target computer so that the driver can maintain a connection to the instance of Internet Explorer it creates.
For 32-bit Windows installations, the key you must examine in the registry editor is HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
For 64-bit Windows installations, the key is HKEY_LOCAL_MACHINE\SOFTWARE\Wow6432Node\Microsoft\Internet Explorer\Main\FeatureControl\FEATURE_BFCACHE.
Note that the FEATURE_BFCACHE subkey may or may not be present, and should be created if it is not present. Inside this key, create a DWORD value named iexplore.exe with the value of 0`.
Solution
First, you need to ensure that the Protected Mode settings for each zone to be the same value. Additionally you also need to ensure the Required Configuration for Internet Explorer Driver.
References
You can find a couple of relevant discussions in:
Internet Explorer Protective mode setting and Zoom levels
How does the registry entry HKEY_LOCAL_MACHINE\…\FEATURE_BFCACHE for InternetExplorerDriver solves the Internet Explorer 11 issue?
How to ignore zoom setting
Selenium InternetExplorerDriver doesn't get focus on the window
How to ignore protected Mode Settings for Internet Explorer using setCapability() through Selenium and Java?

How to modify the TI SensorTag Firmware to advertise indefinitely?

When the side button of the TI SensorTag is pressed, pairing with a device is possible for approx. 2-3 minutes. How do you modify the SensorTag's firmware so that it advertises forever and pressing the side button is not necessary every time?
And how do you upload the firmware with an iOS device, so without using CC-debugger?
How I did it, with help of Chris Innanen (thanks!!)
You will need a Windows virtual machine if you do it on a Mac.
Download IAR Embedded Workbench for 8051 (http://supp.iar.com/Download/SW/?item=EW8051-EVAL). Make sure to take the 30-day evaluation copy and not the 4k limited.
Download BLE-STACK from Texas Instruments (http://www.ti.com/tool/ble-stack) and install it on a Windows (virtual) machine. By default, the installer will install here: "C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\SensorTag\CC2541DB\SensorTag.eww".
Open this SensorTag.eww file with IAR Embedded Workbench.
Select "CK2541DK-Sensor-OAD-ImgA" in the dropdown menu in the "workspace" section on the left
To prevent a compiling error later on: go to Project -> Options... and change the value for "Number of virtual registers" from 16 to 8.
Find "SensorTag.c" in the filetree in the workspace section on the left: "SensorTag - CK2541DK-Sensor-OAD-ImgA/APP/SensorTag.c"
Search for GAP_ADTYPE_FLAGS_LIMITED and change it to GAP_ADTYPE_FLAGS_GENERAL to enable indefinit advertising
Make the build with Project -> Make. Wait until it's done
By default, the new firmware image (.bin file) is now in "C:\Texas Instruments\BLE-CC254x-1.4.0\Projects\ble\SensorTag\CC2541DB\CC2541DK-Sensor-OAD-ImgA\Exe" (Make sure to place it somewhere you can reach it from Mac OS X later, if you use a virtual machine)
Repeat steps 4 to 10, but now for "CC2541DK-Sensor-OAD-ImgB"
Now get the app to upload the new firmware over the air. Get it here: https://itunes.apple.com/us/app/ti-sensortag/id552918064?mt=8
Open iTunes in Mac OS X and open your iOS device, go to the 'Apps' section, scroll to the bottom to see the apps with filesharing possibilities. "SensorTag" should be in that list. Click on it and add the two new firmware files, both Image A and B.
If that's done, open the SensorTag app on your iOS device and connect it to the SensorTag. Then in the bottom of the app tap "Update FW" -> "Select FW file" -> Shared Files > And then tap Image B and upload it. It takes a few minutes. A firmware with type A is already on your SensorTag by default. Because you've put a B Image on it just now, with any new changes you would need to upload an Image A.
Good luck!
Additional: changing the signal strength
1) Find "HCI_EXT_ClkDivOnHaltCmd" and you'll add a new line (and optional comment) after it:
// ADDITION Adjust TX power level
HCI_EXT_SetTxPowerCmd( HCI_EXT_TX_POWER_0_DBM );
1b) You can change "_0_DBM" to "_4_DBM" or "_MINUS_6_DBM" or "_MINUS_23_DBM" as well
2) Find "GAP_ADTYPE_POWER_LEVEL" and change the value on the next line to match the above power level
The above solution didn't work for me until I changed:
initial_advertising_enable = TRUE;
In SensorTag_Init().
I am using this firmware and it will start broadcasting whenever it's not connected. The side button acts as an on and off switch.
http://www.myweathercenter.net/installing-a-new-firmware-for-ti-sensortag/

unable to view silverlight based sites -Your current security settings do not allow this file to be downloaded

I am trying to browse silverlight.net from a fresh windows2008 machine
I try to download the silverlight plugin displayed in the above site, instead the error message below is shown.
Error: Your current security settings
do not allow this file to be
downloaded.
I tried adding the site to trusted zone as well but no use
Is there anyother tweak I need to do
Windows Server 2008 comes very locked down. Way too much so, in my opinion. My first recommendation would be to download and install Chrome, which is a much better browser all around, and then go from there. But that aside, you can also try:
Try this (from here):
Open Internet Explorer browser
- Go to Tools menu
- Select Internet Options
- Go to Security tab
- Select Internet zone
- Click on "Custom level..."
- Under Downloads category, enable the option "File download"
- Under Miscellaneous category, select Prompt (recommended) for the option "Launching applications and unsafe files"
- Under Miscellaneous category, select Prompt (recommended) for the option "Launching programs and files in an IFRAME"
- Validate the changes by clicking on OK
- Leave the Internet Options
- Close the browser
- Re-open it, this issue should be fixed ^^
Arcgis.com also uses SilverLight. It complains "This application requires you to update your browser with the Microsoft Silverlight plugin. Click here to update." The update link seems to be valid, and works after applying Ken Smith's answer from 31Jan, but downloads a 32-bit version under IE 11.0.9600.17207, under Win 8.1 x64. The installer says a newer version is already installed, and aborts. After restarting IE, back to the same complaint at arcgis.com.
Clearly IE under Limited User acct has some additional setting(s) that need tweaking. IE under Admin acct works fine accessing arcgis.com .
Via: www.iegallery.com/Addons/Details/644, tried "Add to Internet Explorer", but nothing happened. JavaScript must be enabled.
However, even after getting to a place where the valid version of SilverLight will download, the install fails, because "the same version is already installed". So IE under a Limited User acct is Still w/Out SilverLight plug-in...

Resources