In one of our test machines, 2 browsers are counted though only 1 is displayed, causing UFT not to identify and enter value to objects since we are using RegEx:
Browser("title:=.*").Page....
We are using the below line to initialize IE:
InvokeApplication "C://Program Files/Internet Explorer/IEXPLORE.EXE"
What is the workaround for this?
UFT version is 12.02.
Thanks in advance!
I would first close all the open instances of IE by using:
SystemUtil.CloseProcessByName("iexplore.exe")
And then open the new instance using:
SystemUtil.Run "iexplore.exe","TestURL","C:\","",3
Check this link for more information on SystemUtil.
Follow below steps:-
1) close all the process of IE using WMI object.
Set ObjWMI= GetObject("WInmgmts:")
Set oProcess = ObjWMI.ExecQuery("Select * from win_32 Process")
For each p in oProcess
if p.name = "iexplorer.exe" Then p.terminate
Next
2) webUtil.deleteCokkies
3) Then open your application using systemUtil.run..
Hope it will help
Thanks for all your input. I learned a lot from you. I already found the root cause. It was after all not the multiple open browsers but a timing issue with the log in page for one of the machines. The email address text box object is visible however, it cannot be identified by UFT immediately that is why I added a sync point to wait max of 4 minutes until object.Exist(240)=true. Thank you all!
Related
This question already has answers here:
Logging Messages from Java Class back to the Karate Report
(3 answers)
Closed 1 year ago.
While using Karate I need to receive information from browser console (e.g. Firefox) when an error occurs.
How can I do it with Karate?
1) Is there any way to save the browser console log? (or attach it to features report)?
In Selenium I use this to log browser console in case error occurs:
if (webDriver != null) {
LogEntries logs = webDriver.manage().logs().get(LogType.BROWSER);
for (LogEntry entry : logs) {
LOG.error(entry.getLevel() + " " + entry.getMessage());
}
}
2) Is it possible to trigger it in similar way to take screenshot after scenario?
e.g (after scenario screenshot when some error occurs):
configuration:
karate.configure('afterScenario', read('afterScenarioScreenshot.js'));
afterScenarioScreenshot.js:
function()
{
if (karate.info.errorMessage) driver.screenshot()
}
Thank you for any idea.
The only suggestion I have is to use showProcessLog: true in the driver config.
Now you should see any FireFox process (console) logs in-line with the HTML report.
There may be ways to switch on the detailed logging that you want. Note that you can add command line options using addOptions in the driver config: https://firefox-source-docs.mozilla.org/testing/geckodriver/TraceLogs.html
The "WebDriver" way to switch the log level is by using the driver "capabilities". Refer the above link and see if you can set this for FireFox. It would be good if you post back your findings so that it helps others. In Karate, you use the webDriverSession to configure this.
The logs will be in some file. You should be able to write some code to scrape from it any time during a test if they don't show up in the HTML report.
If you need something more, please consider contributing code.
I am still quite new to this topic, so sorry if I didn't provide enough information.
For the first time, I copoed everything from https://developers.google.com/actions/dialogflow/first-app to learn about it, which works great.
After, I tried to create my own one, then at the end, I got this message "My test app isn't responding right now. Try again soon." from https://console.actions.google.com/project/[[PROJECT-ID]]/simulator/.
Therefore, I tried to delete everything and make a complete new start, including all the projects on https://console.actions.google.com/ and https://console.dialogflow.com.
I then copied the exact same thing from https://developers.google.com/actions/dialogflow/first-app again, but this time, I still got "My test app isn't responding right now. Try again soon." from https://console.actions.google.com/project/[[PROJECT-ID]]/simulator/.
I tried to look at firebase log, no error indeed
I tried to use the web demo from the integration tab, everything works (which means the server side code or the connection have no problem) as expected, firebase also logged the request.
I tried to use a different browser (chrome -> firefox) still not working.
Here is the response code from the Google Assistant Simulator (its kinda nothing):
{
"audioResponse": "//NExAARqQ...",
"conversationToken": "GidzaW11bG...",
"response": "My test app isn't responding right now. Try again soon.",
"visualResponse": {
"visualElements": []
}
}
And here is the debug message (yes, its nothing in there, so I'm stuck):
{
"agentToAssistantDebug": {},
"assistantToAgentDebug": {}
}
Any help would be appreciated. Thanks!
In Actions Console..
Go to Develop -> Invocation
Set a display name (Eg: Hello World) and click Save
Go to Test and type "Talk to Hello World"
Fixed the issue for me.
Make sure your Actions on Google project has a name.
I spent almost 2 days scratching my head on this. Just go to Activity controls of the relevant google account (The account that you are using for the simulator) and turn on all those switches (You may leave out Youtube related stuff).
And.....Voila, it works!
Usually, these are turned off for non-personal accounts.
Faced the same issue when I tried to change the language of app to a locale.
Try the following,
Check if the welcome intent and fallback intents have responses and training phrases
All contexts are mapped
Disable and enable testing
At least in my case, I've added 'Suggestions' for an ending scene, like below:
You can see the error on the right side log of 'Test' page:
Fix is to remove 'Suggestions' in ending scene.
I had the exact same issue and after struggling for hours I found the stupid error on my side: In my Dialogflow Agent settings, I accidentally turned on the V2 API. So my firebase function kept complaining about null intent. Hope this help.
I have a broker query where I need to sort by 2 different fields (using JSP and 2011 SP1)
The API has the method "addSorting" which I am applying.
It appears, however, that the second addSorting call is overwriting the first addSorting call - rather than adding the second sort:
// Sort by Date
CustomMetaKeyColumn customMetaKeyColumnDate = new CustomMetaKeyColumn("date", MetadataType.DATE);
query.addSorting(new SortParameter(customMetaKeyColumnDate, SortParameter.DESCENDING));
// Sort by Owner
CustomMetaKeyColumn customMetaKeyColumnOwner = new CustomMetaKeyColumn("owner", MetadataType.STRING);
query.addSorting(new SortParameter(customMetaKeyColumnOwner, SortParameter.ASCENDING));
They sorts work fine individually.
Is this expected? Is addSorting really a setSorting - where only 1 sort can be specified or am I missing a way to combine 2 sorts?
The addSorting method works just fine. However, it simply does not work for CustomMeta columns!!! There is already a confirmed defect regarding this subject with the following summary: "SortParameter does not work with two metadata fields". This is still an open defect for 2011SP1 and is scheduled to be fixed only for the next release.
Cheers,
Daniel.
Sorry if I do ask a question which has been asked before. I was searching a lot in this forum and via Google but couldn't find an answer.
I'm very new to Monkeyrunner and trying to solve the problem to automatically unlog my USB device which is secured with a pattern.
Is it possible to add a drag functionality with 2 different directions? A to B to C? A pattern usually needs at least 4 dots, which makes two directions for dragging.
I wrote this script which works fine observing the screen, but it interrupts in between which is not accepted by the phone:
print ("Unlocking screen.")
device.wake()
device.touch(400, 314, MonkeyDevice.DOWN)
device.drag((400, 314),(80, 635), 1,3)
device.drag((80, 635),(400, 635), 1,3)
device.touch(400, 635, MonkeyDevice.UP)
I hope someone is able to help. Thanks!
I have just published an article about automated android testing using sikuli and the example was unlocking the emulator screen using the slide lock.
After reading your question I added another example of unlocking the emulator when it's locked by a pattern lock. Creating it would take you 5 minutes.
This doesn't directly solve your issue but may help you get further along and may help others.
I use this function to unlock a non-password protected device after a reboot:
def unlock(device):
# Performs a swipe-up operation to unlock the device (no password)
xStart = 0
yStart = 1000
device.touch(xStart, yStart, MonkeyDevice.DOWN)
for i in range(1, 10):
yCurrent = yStart - 100 * i
device.touch(xStart, yCurrent, MonkeyDevice.MOVE)
time.sleep(0.1)
device.touch(xStart, yCurrent, MonkeyDevice.UP)
I am running a simple query to get data out of my database & display them. I'm getting an error that says Response Buffer Limit Exceeded.
Error is : Response object error 'ASP 0251 : 80004005'
Response Buffer Limit Exceeded
/abc/test_maintenanceDetail.asp, line 0
Execution of the ASP page caused the Response Buffer to exceed its configured limit.
I have also tried Response.flush in my loop and also use response.buffer = false in my top of the page, but still I am not getting any data.
My database contains 5600 records for that, Please give me some steps or code to solve the issue.
I know this is way late, but for anyone else who encounters this problem: If you are using a loop of some kind (in my case, a Do-While) to display the data, make sure that you are moving to the next record (in my case, a rs.MoveNext).
Here is what a Microsoft support page says about this:
https://support.microsoft.com/en-us/help/944886/error-message-when-you-use-the-response-binarywrite-method-in-iis-6-an.
But it’s easier in the GUI:
In Internet Information Services (IIS) Manager, click on ASP.
Change Behavior > Limits Properties > Response Buffering Limit from 4 MB to 64 MB.
Apply and restart.
The reason this is happening is because buffering is turned on by default, and IIS 6 cannot handle the large response.
In Classic ASP, at the top of your page, after <%#Language="VBScript"%> add:
<%Response.Buffer = False%>
In ASP.NET, you would add Buffer="False" to your Page directive.
For example:
<%#Page Language="C#" Buffer="False"%>
I faced the same kind of issue, my IIS version is 8.5. Increased the Response Buffering Limit under the ASP -> Limit Properties solved the issue.
In IIS 8.5, select your project, you can see the options in the right hand side. In that under the IIS, you can see the ASP option.
In the option window increase the Response Buffering Limit to 40194304 (approximately 40 MB) .
Navigate away from the option, in the right hand side top you can see the Actions menu, Select Apply. It solved my problem.
If you are not allowed to change the buffer limit at the server level, you will need to use the <%Response.Buffer = False%> method.
HOWEVER, if you are still getting this error and have a large table on the page, the culprit may be table itself. By design, some versions of Internet Explorer will buffer the entire content between before it is rendered to the page. So even if you are telling the page to not buffer the content, the table element may be buffered and causing this error.
Some alternate solutions may be to paginate the table results, but if you must display the entire table and it has thousands of rows, throw this line of code in the middle of the table generation loop: <% Response.Flush %>. For speed considerations, you may also want to consider adding a basic counter so that the flush only happens every 25 or 100 lines or so.
Drawbacks of not buffering the output:
slowdown of overall page load
tables and columns will adjust their widths as content is populated (table appears to wiggle)
Users will be able to click on links and interact with the page before it is fully loaded. So if you have some javascript at the bottom of the page, you may want to move it to the top to ensure it is loaded before some of your faster moving users click on things.
See this KB article for more information http://support.microsoft.com/kb/925764
Hope that helps.
Thank you so much!
<%Response.Buffer = False%> worked like a charm!
My asp/HTML table that was returning a blank page at about 2700 records. The following debugging lines helped expose the buffering problem: I replace the Do While loop as follows and played with my limit numbers to see what was happening:
Replace
Do While not rs.EOF
'etc .... your block of code that writes the table rows
rs.moveNext
Loop
with
Do While reccount < 2500
if rs.EOF then recount = 2501
'etc .... your block of code that writes the table rows
rs.moveNext
Loop
response.write "recount = " & recount
raise or lower the 2500 and 2501 to see if it is a buffer problem. for my record set, I could see that the blank page return, blank table, was happening at about 2700 records, good luck to all and thank you again for solving this problem! Such a simple great solution!
You can increase the limit as follows:
Stop IIS.
Locate the file %WinDir%\System32\Inetsrv\Metabase.xml
Modify the AspBufferingLimit value. The default value is 4194304, which is about 4 MB.
Changing it to 20MB (20971520).
Restart IIS.
One other answer to the same error message (this just fixed my problem) is that the System drive was low on disk space. Meaning about 700kb free. Deleting a lot of unused stuff on this really old server and then restarting IIS and the website (probably only IIS was necessary) cause the problem to disappear for me.
I'm sure the other answers are more useful for most people, but for a quick fix, just make sure that the System drive has some free space.
I rectified the error 'ASP 0251 : 80004005' Response Buffer Limit as follow:
To increase the buffering limit in IIS 6, follow these steps:
Click Start, click Run, type cmd, and then click OK.
Type the following command, and then press ENTER:
cd /d %systemdrive%\inetpub\adminscripts
Type the following command, and then press ENTER:
cscript.exe adsutil.vbs SET w3svc/aspbufferinglimit LimitSize
Note LimitSize represents the buffering limit size in bytes. For example, the number 67108864 sets the buffering limit size to 64 MB.
To confirm that the buffer limit is set correctly, follow these steps:
Click Start, click Run, type cmd, and then click OK.
Type the following command, and then press ENTER:
cd /d %systemdrive%\inetpub\adminscripts
Type the following command, and then press ENTER:
cscript.exe adsutil.vbs GET w3svc/aspbufferinglimit
refers to https://support.microsoft.com/en-us/kb/944886
If you are looking for the reason and don't want to fight the system settings, these are two major situations I faced:
You may have an infinite loop without next or recordest.movenext
Your text data is very large but you think it is not! The common reason for this situation is to copy-paste an Image from Microsoft word directly into the editor and so the server translates the image to data objects and saves it in your text field. This can easily occupies the database resources and causes buffer problem when you call the data again.
In my case i just have writing this line before rs.Open .....
Response.flush
rs.Open query, conn
It can be due to CursorTypeEnum also. My scenario was the initial value equal to CursorTypeEnum.adOpenStatic 3.
After changed to default, CursorTypeEnum.adOpenForwardOnly 0, it backs to normal.