UFT's object spy feature doesn't read values correctly on Edge browser.
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.
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...
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:
Thank you very much in advance for your assist.
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?
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.
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.
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.
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.
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?
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>
Thank you very much for your help.