How to handle user gesture required is required error from browsers - asp.net-core

Hello I'm using neodynamic weblientprint to print directly from browser. There's a part that includes a script that detects if the client utility is installed, after which its retrives the printers installed on the system.
However I intermittently get this error when the script runs - Unable to launch 'webclientprintvi: -getPrinters: because a user gesture is required.
I get this error on some client system browsers, while some client systems browsers never show this error. Is there a setting that needs to be configured on the browser. Browsers tests are chrome and edge
Thanks.

I discovered that if you are using the WCPP detection feature, then calling jsWebClientPrint.getPrinters() will produce the "...because a user gesture is required" console error. I had a page that called that method w/o the detection and it worked w/o complaining.
I didn't dive any deeper than that as to determining why the extra embedding detection causes this to happen. I just re-worked the page, calling the method instead on a Refresh button click; which, of course Chrome is then happen with.

Related

Trouble getting Selenum automated testing to auto-login using my profile

I'm using MS Edge browser (Version 109.0.1518.78) along with Selenium to do some automated UI testing with my corp environment.
Trouble is, the tests are always prompting challenging me to login.
Now here's the confusion: when i use Edge normally, the browser uses my profile settings to auto-authenticate me. However, when running the tests (via Visual Studio), an Edge browser instance is started WITHOUT my profile.
First thing I tried:
I have tried following various example without any success, such as this one from SO. Using this example i added these 2 arguments like this:
This didn't do anything. So I'm wondering if maybe the arguments have changed? The edge driver documentation is worthless when it comes to this.
Second thing I tried:
I tried creating edge driver service with arguments of my edge driver path.
Unfortunately, i get a driver initialization error saying something about "msedge.exe".
Summary
The summarize, my problem is that my selenium tests are starting an edge browser instance without my default corp profile. therefore i am forced to manually login, which is what i want to avoid.
Note that occassionally things will work fine as expected. Then suddenly the next day it reverts to this default behavior again. I am no sure what is going on!

RROR – unable to acquire LMS API, content may not play properly and results may not be recorded. Please contact technical support

We are in the process of implementing Success Factors LMS, and trying to play and view SCORM compatible files exported from Adobe Captivate 8 and 9 in Success Factors LMS.
I get the message - 'ERROR – unable to acquire LMS API, content may not play properly and results may not be recorded. Please contact technical support’
I have tried SCORM versions 1.2 v3 and 2004 V2 and V4. We can view the content, however it does not track, show as complete etc.
We are also producing Scorm compliant files using Skillcast and Articulate, but we still hit the same issue, we can view the content after closing the API error window, but still does not track.
Anyone experienced this problem before? Or know of a fix?
Many thanks
Normally this issue comes up when the course is unable to get the SCORM API from the LMS...I have seen a ton of SCORM content running in Success Factors before, so I wonder if the issue is in the setup. Are you seeing any "Access Denied" type errors in the browser element inspector/developer tools? I wonder if the course just can not find/have access to the player window. If the course is launching in a new window, you may want to try launching it in the frameset. I have seen folks get around this issue by making sure the player and sco are in the same window...
If you wanted to rule out the content being the issue, you can always test your content in the SCORM Cloud's free sandbox (https://cloud.scorm.com) to make sure the course is properly asking for the API...
If you have any other questions, we would be happy to help...you can just shoot us an email at support#scorm.com.
Thank you!
Joe
The error occurs because the content is not speaking to the Learning Management System (LMS). The code that runs to initialize the session doesn't happen. There is no return "ping" from the LMS.
You will get this error when you publish in SCORM and run from your desktop, or from a web server that isn't connected to an LMS. If it occurs when you are launching from an LMS it can either mean that the SCORM API isn't configured correctly, or your content server is on a different domain (cross-domain) than your application servers.
To test, you should try launching your content in different browsers. Our system was configured in such a way that Firefox and Chrome read our content to be cross-domain issue, and threw the SCORM API error, but Internet Explorer worked just fine.
In the end, it was determined that our server configuration in tandem with our firewall and security settings read the Content server as cross-domain and we had to redeploy our content servers within the firewall.

Saucelabs tests block on browser allow dialog

My web app uses IndexedDB and I'm testing on SauceLabs. Some months back my tests ran but now they block on a browser dialog that says "http://gbserver3.cs.unc.edu/" wants to: store files on this device", with an Allow button.
This is Win7 and Chrome or Firefox. Likely others too.
How can I dismiss or prevent this dialog?
Update: I have discovered that if I don't ask for quota I don't get the popup and my tests succeed. I'd still like to learn how to get rid of that dialog.
we are using Nightwatch.js in our project and we were facing the same issue.
What actually did the trick was using --unlimited-storage switch when launching the browser.
(List of other command line switches for Chromium can be found here)

IBM Worklight 5.0.6 - Using WebViewOverlay sample code and connectOnStartup don't work together

Using the Worklight v5.0.6 code sample/tutorial "Integrating server-generated pages in hybrid applications" (http://public.dhe.ibm.com/software/mobile-solutions/worklight/docs/v506/WebViewOverlay.zip) allows for the web content to be integrated. The code sample works fine and web content integrated correctly.
However, when I set connectOnStartup to true in the apps//common/js/initOptions.js file, the tabs and web content from the WebViewOverlay fail to load.
I see in the wlclient.js (apps//android/native/assets/www/default/wlclient/js/wlclient.js) that there is a check that if doConnectionOnStartup is true, then call WL.Utils.wlCheckReachability(), else call finalizeInit()
It appears that the WebViewOverlay and the tabs are created by the finalizeInit() being called, but if connectOnStartup is set true, then finalizeInit is not called.
How can I get both the WebViewOverlay to work and the connectOnStartup to work together?
This is, most probably, caused by connection failure. wlCommonInit function will be invoked only after successful connection, in case connection fails it will never be invoked. First of all - check your connectivity from a mobile handset to WL server. Second, you can either manually use WL.Client.connect() after tabbar was initialized (like Carlos suggested) or specify onConnectionFailure callback in your initOptions.
I provided what I did above in the comments - but it turned out that the dialog box to indicate an update was available was not showing up, and instead the error message "WL.SimpleDialog.show() error in invoking callback." was seen in the log messages of logcat. This log message is coming from worklight.js (apps//android/native/assets/www/default/wlclient/js/worklight.js) on line 820. Just FYI, I did change the worklight.js code to print out err, and it said "No class found". I didn't take the troubleshooting any further at that point
So the app was contacting the WL Server correctly, but the dialog to indicate an update was available was not appearing.
To fix, I simply created a new hybrid app and brought over the necessary code to get the WebViewOverlay to work

How to test a cocoa touch app for the case when the network fails while downloading a file?

My iOS application, among its features, download files from a specific server. This downloading occurs entirely in the background, while the user is working on the app. When a download is complete, the resource associated with the file appears on the app screen.
My users report some misbehavior about missing resources that I could not reproduce. Some side information leads me to suspect that the problem is caused by the download of the resource's file to be aborted mid-way. Then the app has a partially downloaded file that never gets completed.
To confirm the hypothesis, to make sure any fix works, and to test for such random network vanishing under my feet, I would like to simulate the loss of the network on my test environment: the test server is web sharing on my development Mac, the test device is the iOS simulator running on the same Mac.
Is there a more convenient way to do that, than manually turning web sharing off on a breakpoint?
Depending on how you're downloading your file, one possible option would be to set the callback delegate to null halfway through the download. It would still download the data, but your application would simply stop receiving callbacks. Although, I don't know if that's how the application would function if it truly dropped the connection.
Another option would be to temporarily point the download request at some random file on an external web server, then halfway though just disconnect your computer from the internet. I've done that to test network connectivity issues and it usually works. The interesting problem in your case is that you're downloading from your own computer, so disconnecting won't help. This would just be so you can determine the order of callbacks within the application when this happens, (does it make any callbacks at all? In what order?) so that you can simulate that behavior when actually pointed to your test server.
Combine both options together, I guess, to get the best solution.