LeanFT 15.0.2 is not identifying Web Elements in MSEdge - c#

We am using LeanFT with C# to automate my Sample Web Application which is heavily used in IE only. Since microsoft is ending support with IE, we are moving the tests to MSEdge where there are certain components which will be loaded in Browser if and only if I enable the EDGE browser to use IE server mode
Now once the IE Server mode is enabled on MSEdge, the browser is launching and the URL is being navigated. But when I enable Object spy two identify an element for my OR file, the browser view window is completely shown as IEserverWindow ( i.e Standard Desktop Windows ) and the web elements can't be identified
I had enabled UFT extension on browser by manually loading unpacked extension on Edge
Added the NativeMessgaingHost key

We need to upgrade to UFT 2021
https://admhelp.microfocus.com/uft/en/2021-2021_R1/UFT_Help/Content/Addins_Guide/Chrome_Chromium_FF_Limitations.htm#IE

Related

Is there any way to fully control browser from application?

I was trying to make a pc application that helps people more conveniently when they are using a browser(e.g Chrome, Firefox, Edge ...)
For example, the application shows the default browser and let user can choose another browser as default if they want to, and the app shows all windows that are currently opened; Overmore, when the user clicks a specific window then app will focus the window.
user can select default browser
user can see all windows categorized by browser type
So, my initial planning was using Election js; however, I've found that there is no way to control a browser from the Electron application since Node js cannot access the users' system(this thinking could be wrong since I have poor English😥)
After some research, I'm guessing C# can do that by using windows api. I've saw this post that saying by using DDE, we can get tabs urls.
But I'm wondering if C# can fully control a browser; for instance, create a new window, notice if music or video is playing in the tab, request to browser for getting favorites list.
If it cannot, how about requesting api to the browser from pc application?
You cannot fully control a browser. Internet Explorer was the only browser that had a documented and supported API to control, inspect and automate. Internet Explorer is dead so this is a dead end. The basic DDE control interface is also outdated.
Accessing favorites and the content of open tabs is limited because evil people would use such APIs to inject and spy. If you want to access the favorites you will have to write custom code for each browser.
Using the accessibility and UI automation APIs is the only reliable and supported way of interacting with modern browsers. SetWinEventHook can be used to detect window creation and primitive state changes. MSAA/UI Automation needs to be used to get more information from each browser window.
The thumbnail API and/or magnifier API can be used to get the preview image.
To open a new tab, execute a new process with the URL on the command line. Some per-browser customization might be required (-new-tab parameter etc).
Use IApplicationAssociationRegistration::QueryCurrentDefault to detect the default browser.

Schema URIs in Windows Store Apps vs Chrome

I'm developing an app for Windows 8.1 called myTrip and I'm implementing my custom scheme URI for the app. I want this URI : mytrip:place:/m/0942y1 to open my app and navigate to a place with that ID. I have the logic done, it works fine if I run it from Windows + r. I want to distribute this uris in a facebook page, and when a user clicks on it, the app will open and the place shown. It's more or less the same thing that the windows store web page of your app does:
http://apps.microsoft.com/windows/en-us/app/mytrip/ae689d16-f349-4596-8bc7-e0eeab87ec24
This works in IE and Chrome, the schema that opens the store app is this:
ms-windows-store:PDP?PFN=19185FernandoUrkijoCerced.MyTrip_q1p7rzex4ekjr
If you copy and paste it on Chrome, and you have Windows 8, the app store will open. But, if I try with my custom URI:
myTrip:place:/m/0942y1
It only works on IE, not on Chrome. Why the Windows app store schema URI works with Chrome and not with my schema? Any ideas or hacks to bypass this problem?
Thanks you.
Chrome does not automatically recognize custom protocol handlers. Firefox will recognize when you are trying to use a protocol handler and offer to create a protocol handler definition for you. IE recognizes them.
On top of this, Chrome by default excludes protocol handlers it doesn't know.
In order to add your app's handler to Chrome:
With Chrome Closed
Navigate to "C:\Users\%Username%\AppData\Local\Google\Chrome\User Data"
Edit the file "Local State" with Notepad (or Notepad++)
Go down to the section marked "protocol_handler". You can also search for "ms-windows-store"
Add a line in "excluded schemes": "myTrip": false,
Save the file
Start Chrome
You should be able to use your protocol inside Chrome now.

Security testing a hybrid web and desktop application

Setting the context:
We have an internal app that started out as a web application, but now uses the windows desktop model instead of the browser for rendering. So instead of opening in browsers, the web app opens in modeless windows that are coded in C#. The user has to install a small exe to setup the modeless windows.
You would be clicking custom built toolbars (instead of the File, Edit, View options etc) and those will launch modeless windows and trigger an HTML request. The reponse will be rendered in the modeless window.
Issue:
we used to security test using Appscan when it was a pure browser application. We also use pen testers. However, Appscan doesn't work with the modeless windows model. It only manages to capture the first request (which is usually the login request).
Would you happen to know of any tool or testing framework/model that can security test this kind of an app?
I did try to look at relevant links, but they all seem to point to pure browser based web testing. Like this one: Web application security testing
Thanks in advance!
Edit: An example - have a look at http://samples.msdn.microsoft.com/workshop/samples/author/dhtml/refs/showModelessDialog.htm
How would I get appscan to scan the request response in the modeless windows.
What needs to be tested (for security) beyond the login? You've essentially created a dumb terminal that passes commands to a server and renders responses from that server.
If you really need some automated tester to work, then create a command-line switch for your EXE (dumbtermina.exe /test) that renders a regular windows form with simple buttons that simulate all of the menu and other commands.

Selenium webdriver disabled on browser start?

I am using the Selenium Firefox web driver and attempting to start an existing profile which I have created specifically for Selenium.
Firefox starts up with the correct profile, but the web driver shows as disabled in the extensions and therefore Selenium fails to connect to the web driver. How can I make sure that it starts with the extension enabled?
I would post code, but the code is working properly and the correct profile is used. This is a Firefox configuration issue I believe. If I let Selenium create a temp profile it works fine, but I need access to one of the extensions that I have setup as well as the configuration for that extension. I saw that it is possible to load extensions through code but I don't know how I could load an identical configuration.

IE Plug-Ins (QVP) in C# WebBrowser Control?

I'm writing a C# application that uses a System.Windows.Forms.WebBrowser control to access a web application.
In this web application we use a program (Quick View Plus) that integrates with Internet Explorer to provide in-browser viewing for a number of document types not normally handled by Internet Explorer (WPD, DOC, XLS, PDF, etc.).
My understanding of the WebBrowser control is that it shares settings with the user's own copy of IE, however, I am seeing different behavior between the two:
When I open the web application in Internet Explorer, all desired file types are successfully opened using Quick View Plus.
When I open the web application in the WebBrowser control, only PDFs are loaded in Quick View Plus (showing, at least, that it can run inside a WebBrowser control) - however, other formats (for instance WPD, XLS, DOC) are not opened in Quick View Plus - instead the browser downloads them and automatically opens them with the default application.
Why could this behavior vary, and what steps should I take to try to get it to behave consistently?
If relevant, IE8 is in use.

Categories

Resources