Highlighted
Regular Contributor.
Regular Contributor.
1018 views

UFT's object spy feature doesn't read values correctly on Edge browser.

Greetings.rajni cap.png

I have a doubt about an issue with an application in Edge browser with these caracteristics: front end html, javascript and server side python programming language.

Please look at the screenshot I take. When I use the object spy and point to a text area that has that value in it in the app, it collects that data without a space in the text. Whereas html source debugger shows correct. You can see that in the object spy it says 'info.makeok...' instead of 'info.make ok...'.

This only happens in Microsoft Edge browser, with the other common ones (Chrome, Firefox, IE...) this does not show up. I am wondering if this behavior is an espected one in this browser only. Is it? Please advice.

Thank you in advance.

 

 

 

 

0 Likes
10 Replies
Highlighted
Super Contributor.
Super Contributor.

Hi,

I guess this is not a common case since even in this single text area control, not all the spaces are trimmed. Maybe there's some special circumstances that caused this. If it's possible to provide your AUT for our investigation should be the best.

I also take a look on w3school sample and seems that the spaces there works fine...

EdgeSpace.png

Highlighted
Trusted Contributor.
Trusted Contributor.

Thank you for the follow up in this strange behavior.

I will have to rquest the permission to bring you the AUT, as in my company we have some serious security standards. Let me see if I can find a way to provide it to you.

Actually, my mistake. The values imput in the text area are CR LF characters instead of spaces. I believe that maybe this special characters are generating this kind of situation. What I can share you for now is a capture of the text area in my AUT:

text area.PNG

Thank you very much in advance for your assist.

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Ok I see there could be a new line or some other character. Since Edge is using a different mechanism from others, there might be some difference here. Is it somehow blocking your testing? Maybe we can find an easy workaround like using regular expression?

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

test area spy.png

 

Thank you for the advice, Evan.

I got the same behavior with the text area sample of w3schools. I am using UFT 14.02 and load at least Web, ActiveX and UIautomation add-ins when I test my AUT, which is a Web one.

Got to recall that I am not tapping 'Enter', nor 'Space' after "make". This is not stopping or blocking my testing, as I am working with IE and the behavior here is not this one in Edge. I just want to know why this problem only appear here on this browser and what could be the workaround to solve this, if possible. You know, like a backup plan. Or document this to help other users that have found thenselves on the same situation. In the knowlegde basement of Microfocus I could not find anything related. Maybe as you said, this is not a common issue that has been reported.

Thank you very much for the help.

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

rerun edge test.PNG

Here is another update.

If I enter the stream line like that, it is recognized that 'space'. However I cannot change the multi line text to single line as the data comes from a web server. It is not user input.

Another observation: I am using UFT to run automated tests on various browsers (mostly IE, but I use Chrome and Firefox). I can focuss on using those browsers, but to be honest I cannot bypass/skip for the Edge browser alone.

Thank you again for your assist.

0 Likes
Highlighted
Super Contributor.
Super Contributor.

Unfortunately, I cannot repro it on my machine, could you send the code sample used in w3school as an attachment for me to take a try?

As workaround, if checkpoint is failing on Edge, I think we can add a regular expression for the "new line" to make it work over all browsers.

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

I 'm sorry. I wont be able to share the code as it is not mine.

The owner of it cannot and will not make changes to the code due to the fact that UFT is not working for the Edge browser. It is not acceptable for him to make a change. The code works for the end user and it is the issue that is not able to test it with UFT.

I tried to see a way to provide you the AUT, even as an html. But is impossible. We have high security policies.

I guess that even there is no need in provideng the hmtl page, as he w3schools sample is the same scenario for this problem.

Thank you again for your assist.

 

 

0 Likes
Highlighted
Super Contributor.
Super Contributor.

I did not mean to change the code of the site, but you can try to use regular expression to handle the situation, or you can try to trim this specific string for all browsers so test can run pass on all browsers.

For the repro issue, I cannot repro on w3school as well, maybe you can share your code that is having the problem there?

0 Likes
Highlighted
Trusted Contributor.
Trusted Contributor.

IE browser behavior.png

As the code is not mine, it is difficult to provide it complete. Here is a part of it:

If GlobalParamExist("ReaderIPAddress") = False Then
	RunAction "InitDataTable", oneIteraction
End If


'Close all currently open browsers to ensure this is the only browser running
Set oBrowser = Description.Create
oBrowser("micclass").Value = "Browser"
Set allBrowsers = Desktop.ChildObjects(oBrowser)
count = allBrowsers.Count - 1
For i + 0 To count Step 1
	'allBrowsers(i).Close
Next

readerIPAddress = DataTable("ReaderIPAddress", dtGlobalSheet)
networkProtocol = DataTable("NetworkProtocol", dtGlobalSheet)
testBrowser = DataTable("Browser", dtGlobalSheet)
url = networkProtocol + "://" + readerIPAddress
If testBrowser = "chrome" Then
	SystemUtil.Run "C:Program Files (x86)\Google\Chrome\Application\chrome.exe", url
ElseIf testBrowser = "firefox" Then
	SystemUtil.Run "C:Program Files\Mozilla Firefox\Chrome\firefox.exe", url
ElseIf testBrowser = "ie" Then
	SystemUtil.Run "C:Program Files\Internet Explorer\iexplorer.exe", url
ElseIf 'Edge (**need to run webdriver to test it on this browser**)
	SystemUtil.Run "C:Program Files (x86)\HPE\Unified Funtional Testing\bin\webdriverhost.exe", url
End If
Wait 5

Maybe with it will be enough for you to try. Is kind of difficult to convince my partner to help me with this. He is a very stubborn person.

Here is something I want to show you. The screenshot above is from Internet Explorer. Here, even if Object Spy doesn't show the space after 'ok', the UFT debbuger local variable show the multiline text and it works as expected. With Edge is a strange scenario, because it show the variable in a single line without enter or space.

I copied the content from DOM explorer, and visualized it with displaying all characters. I see the below:

<TEXTAREA class="nicefield" type="text" id="cmdresponse" name="cmdresponse" rows="20" cols="70"></TEXTAREA>crlf.png

Thank you very much for your help.

 

0 Likes
Highlighted
Regular Contributor.
Regular Contributor.

Hello.

 

We have workaround the issue. The problem is no longer appearing. Thanks for the assistance.

0 Likes
The opinions expressed above are the personal opinions of the authors, not of Micro Focus. By using this site, you accept the Terms of Use and Rules of Participation. Certain versions of content ("Material") accessible here may contain branding from Hewlett-Packard Company (now HP Inc.) and Hewlett Packard Enterprise Company. As of September 1, 2017, the Material is now offered by Micro Focus, a separately owned and operated company. Any reference to the HP and Hewlett Packard Enterprise/HPE marks is historical in nature, and the HP and Hewlett Packard Enterprise/HPE marks are the property of their respective owners.