We have built our entire project automation suite using UFT 15.0.1.416. We have used Visual studio 2019 to build the automation suite. And there are around 900 test cases we have automated and able to run all of them without any issues in IE 11 browser.
As IE 11 sooner going to retired by Microsoft, we are planning to migrate to Chrome & Edge.
But we are facing issues with Chrome & Edge browsers to run automation scripts.
Chrome Browser: we are able to launch the application & run the scripts.
But running scripts on Chrome is very very slow. It is taking couple of minutes even to execute simple script. When we debug, we have noticed that every operation that interacts with web element is taking lot of time. Even getting the properties of web element like Id, Class are also taking time.
We are using chrome version - 91.0.4472.114.
Edge browser - we are unable to lunch the application using edge browser. Keep on getting following error.
Exception: General Error occurred
at HP.LFT.SDK.Core.Communication.CommunicationClient.HandleError(Action2 onError, Int32 status, IDictionary2 data)
at HP.LFT.SDK.Core.Communication.CommunicationClient.Send(String messageType, IDictionary2 data, Action2 onError)
at HP.LFT.SDK.Web.BrowserFactory.BrowserFactoryInstance.InternalLaunch(Dictionary2 launchInfo) at HP.LFT.SDK.Web.BrowserFactory.BrowserFactoryInstance.<>c__DisplayClass2.<Launch>b__1() at HP.LFT.SDK.OperationExecutionWrapper.ExecuteWithEventsInternally[T](ITestObject testObject, Object additionalInfo, Func1 innerAction, MethodBase methodInfo, Boolean reportOnlyOnError, Object[] arguments)
at HP.LFT.SDK.OperationExecutionWrapper.ExecuteWithEvents[T](ITestObject testObject, Object additionalInfo, Func1 innerAction, MethodBase methodInfo, Boolean reportOnlyOnError, Object[] arguments) at HP.LFT.SDK.OperationExecutionWrapper.ExecuteWithEvents[T1,TR](Func1 innerAction, Func`2 originalMethod, T1 param1, Boolean reportOnlyOnError, ITestObject testObject, Object additionalInfo)
at HP.LFT.SDK.Web.BrowserFactory.BrowserFactoryInstance.Launch(BrowserType browserType)
at HP.LFT.SDK.Web.BrowserFactory.Launch(BrowserType browserType)
And Edge extension is already installed.
Has anyone ever encountered this type of problems ?
Thanks in advance for any help
Please upgrade to latest UFTD 15.0.2 to solve the issue.
Related
https://chromium.googlesource.com/chromium/src/+/master/docs/early-hints.md suggest this is how one would debug if asset was loaded using early hints (103 HTTP status response) like so:
performance.getEntriesByName('https://a.test/style.css')[0].initiatorType
// => 'early-hints'
https://hg.mozilla.org/try/file/cc6f6c969877f92faf9ebda84653aff9fec62b0b/testing/web-platform/tests/loading/early-hints/resources/preload-initiator-type.html -> would confirm this is true.
Yet when I run this statement in chrome console, i'm getting:
performance.getEntriesByName('https://mywebsite.com/img.jpg')[0].initiatorType
'link'
Did early-hints was replaced with link?
Would assume so, but also am seeing no effect on the waterfall chart when early hints get enabled, so chances are chrome is really not respect 103 and does not preload asset. Any other ideas of how to debug early hints in chrome are more than welcome (Using Chrome 106 on OSX).
I am implementing an appium test on remote android driver, with chrome browser for loading urls.
Some of the Urls are pdfs, and chrome asks to store those files. and appears that chrome doesnt have access to filesystem to store those files, which results in a dialog like below.
Please help me pass that dialog without any manual inputs.
Upon clicking continue, it will load actual permissions dialog from Android.
Here is my code initialize appium capabilities
DesiredCapabilities caps = DesiredCapabilities.android();
caps.setCapability("appiumVersion", "1.9.1");
caps.setCapability("deviceName","Samsung Galaxy S9 Plus HD GoogleAPI Emulator");
caps.setCapability("deviceOrientation", "portrait");
caps.setCapability("browserName", "Chrome");
caps.setCapability("platformVersion", "8.1");
caps.setCapability("platformName","Android");
caps.setCapability("autoAcceptAlerts", true);
caps.setCapability("autoGrantPermissions", true);
caps.setCapability("chromedriverArgs", "--allow-file-access-from-files");
caps.setCapability("maxDuration", 10000);
and this is the snippet I use to load a Url
driver.navigate().to("http://kmmc.in/wp-content/uploads/2014/01/lesson2.pdf");
autoGrantPermission also doesnt work in this case because chrome is already installed. Appium team has already rejected this issue -
https://github.com/appium/appium/issues/10008
Please help!
Indeed I had very hard time finding out the solution, but eventually I found a workaround.
The best workaround would have been reinstalling the chrome package. I tried that, but I could not start chrome after reinstalling it, as I had no access to shell, and chromedriver complained. So I left that track.
I tried getting hold of adb command or mobile:changePermissions but for that you need to use server flag --relaxed-security while starting the server, and saucelabs doesnt provide any handy interface to start the server with this flag.
The last resort, I found a solution here - https://stackoverflow.com/a/51241899/4675277 . But just that was not sufficient, because it helped me fix chrome alert, but later on it popped up with another alert with allow and deny, for which another solution in the same question helped me. So this is the code I eventually used -
driver.navigate().to("http://kmmc.in/wp-content/uploads/2014/01/lesson2.pdf");
String webContext = ((AndroidDriver)driver).getContext();
Set<String> contexts = ((AndroidDriver)driver).getContextHandles();
for (String context: contexts){
if (context.contains("NATIVE_APP")){
((AndroidDriver)driver).context(context);
break;
}
}
driver.findElement(By.id("android:id/button1")).click();
contexts = ((AndroidDriver)driver).getContextHandles();
for (String context: contexts){
if (context.contains("NATIVE_APP")){
((AndroidDriver)driver).context(context);
break;
}
}
driver.findElement(By.id("com.android.packageinstaller:id/permission_allow_button")).click();
((AndroidDriver)driver).context(webContext);
This helps allow all permissions required.
I have a Windows Phone 8.1 app with Google login, which uses the
GoogleWebAuthorizationBroker.AuthorizeAsync
method. 90 % of the time, the authentication works, however, occasionally, the app just crashes on this line (I am logging right before it, so I am sure). I have the call wrapped inside try - catch, but that doesn't seem to work - exception is never caught.
I am also sure I am calling the method on a UI thread, I am using the DispatcherHelper from MVVMLight for that.
The fact that I am not able to reproduce the crash complicates this a lot, I have not experienced it with debugger attached, only in Release mode, on target device, run locally.
Do you guys have any ideas / clues / pointers? I know I'm not providing a lot of information, but I don't have any..
EDIT> So the error now happened with debugger attached - and the app just froze, last message in Ouput window was
"WinRT information: Cannot get credential from Vault"
But that's normal behavior..
I have an application that uses MapBox's API to stylize the underlying map which uses Google Places. This all worked perfectly fine when running in IOS 7+, but when I try testing this in IOS 8, it immediately crashes with the following error message:
Terminating app due to uncaught exception NSInternalInconsistencyException, reason: 'The layout constraints still need update after sending -updateConstraints to MapView at {0,0}-{320x444}.
RMMapView or one of its superclasses may have overridden -updateConstraints without calling super. Or, something may have dirtied layout constraints in the middle of updating them. Both are programming errors.'
I have been looking around the Web and Stack for a while but have been unable to find anything helpful unfortunately. Any suggestions?
I deleted all Mapbox framework / headers / lib from my project and reinstalled the latest (1.4.1) mapbox static library (libMapbox.a) and the Headers, and everything was ok after that without changing a line of my code.
I recently encountered a strange thing. On some of my company's servers when an exception message is printed out (yes, bad, I know. It's for debugging), the actual message isn't displayed. Instead it displays the key for an external string resource and says that "Debugging resource strings are unavailable"
After some research I've come up with the following:
In release mode, Silverlight does not package the xap with the dlls containing the actual error messages in order to save space.
I've found workarounds for OLD versions, but nothing for 4. It seems like there are Developer versions of the SL 2 and 3 runtime which will resolve the errors automatically, but I cannot find one for SL 4.
So my question is this:
What the heck do I need to do to my SL 4 app / computer to let me see the full, detailed errors when it's in release mode?
You can download the developer runtime (which contains the full exception strings) from the GetStarted page - http://www.silverlight.net/getstarted/ - search for "Developer Runtimes for Windows and OSX", it's near the bottom of the page.
Though it is too late to reply, it may help somebody else. We have a web application using Silverlight 4, installed in various test environments. This web application consumes more than one WCF services. All but one of the test environment sites consistently failed with message "Debugging Resource strings are unavailable". Agreeably the real exception was swallowed. Being a Silverlight application, there was no logging, and it always appeared that there was something failing in the Silverlight component. I connected the application in my development environment to that particular test environment, and found out that the problem was in fact in one of the WCF services. I fixed the problem at the service end and the SL component stopped having this problem.
Why was the WCF failing?
The WCF service had the following code in the constructor:
public MyService()
{
//Create an instance of Data Lookup service asycnchronously.
if (_dataLookupSrvc == null)
{
try
{
System.Threading.Tasks.Task.Factory.StartNew(() => _dataLookupSrvc = new LookupDataService.LookupDataService());
}
catch (Exception ex)
{
_log.Error<Exception>(ex);
}
}
}
Somebody moved the underlying LookupDataService.dll from the service folder causing the constructor to fail, but not right away. As the LookupDataService instance was created in anonymous method, the exception logging in this method never took place. Once the LookupDataService.dll was dropped in the service folder, the "Debugging Resource strings are unavailable" message went away.
It was a fun wild goose chase!
Have you already checked the event viewer on the machine where the application crashed? Start->Run. eventvwr