I am performing an until loop in logic app. In this loop I'm using a delay function to do the next loop. But if we manage the delay unit to hour, the loop will end in the second time. That means the loop will only executed twice!(Escalation variable is 72 and LoopCounter increments from 0) I want to know if it is a bug from logic app or I did some wrong settings.
Please see the settings as below.
This issue seems to be with 'Until Loop' timeout. To resolve this you can try the following ways:
It looks like this is due to a bug in the way we evaluate the timeout limit value in the until scope.
Remove the triggerBody{} from the limit.timeout property – i.e. make a it a static value
If you really need to make the timeout computation dependent on the payload of the trigger request, you may want to add the “triggerBody()” into the “expression” property of the “until” (this is because we parse the expression when loading dependencies before the action is run)
For example:
You can refer to Configure Logic App 'Until Loop' timeout dynamically, Iteration in Logic Apps terminates prematurely, Until Loop Dynamic Count Limit and Add the Delay-until action
Related
friends.
I need some help, please.
I'm trying to disable the timeout alert in an instruction and pass a timeout parameter, however it's not working:
Driver.FindElementById("ctl01_lnkCharacter", 5000, False).Click
I've already tried the way below too, the same situation happens
Driver.FindElementById("ctl01_lnkCharacter", timeout:=5000, raise:=False).Click
The timeout parameters (5000) and raise for not to alert in case of timeout (False) are ignored. It uses the default timeout parameter, or if it has passed the parameter explicitly before, this value is assumed.
I tested passing the different parameter above to test:
Driver.Timeouts.PageLoad = 1500
Driver.FindElementById("ctl01_lnkCharacter", 5000, False).Click
In this case, the timeout is considered to be 1500 and not 5000 (I did this just to test) and the "False" is ignored, if it reaches the timeout there is an error alert.
In the instruction below it works perfectly:
Driver.Get url, 2000, False
It respects the timeout (2000) and if it is reached there is no error alert.
The problem is only in the .click statement
When I use .FindElementById(...).click What is passed in the parameters as timeout and raise are ignored.
.FindElementById("ctl01_lnkCharacter", TIMEOUT, RAISE).click
I thought I'd try to use a variable, maybe it could works, for example
var = Driver.FindElementById("ctl01_lnkCharacter", 5000, False)
var.click
But I couldn't do that, the variable is not accepted, does anyone have any idea of a solution for this case?
EDIT:
I Forgot to say, the problem is not the timeout, i can pass the timeout before, explicitly.
The problem is the raise, I need to disable the error alert in case of timeout. Is there any other way to disable the error alert in case of timeout (without using On Error Resume Next, I can't use this )
EDIT2:
Sorry, I forgot to say too. The button is clicked correctly, the page opens correctly, but sometimes some images are loaded and I don't need to wait for the loading time and it takes a long time and this time varies a lot, while these images are loading it hits the timeout and generates the error.
That's why I need to disable the timeout error alert (raise parameter False).
I try to create a scenario that I put a user defined delay in my test.
In the start of the test I created JSR sampler and created a variable called
vertica_results_delay and put in it the value of 400000.
Than I crated a timer and put ${vertica_results_delay}, since I want the delay will be configured in the start of the test, the problem is that Jmeter ignores my value, and not wait.
If I used Use defined field and put vertica_results_delay = 4000 it worked, but than all the tests will get the same delay, I do not want to create hard coded delay. I want to enter all properties of the test in the start of the test using JSR.
String vertica_results_delay = "400000";
vars.put("vertica_results_delay", vertica_results_delay);
log.error("vertica_results_delay " + vertica_results_delay);
Check JMeter order of execution
Configuration elements
Pre-Processors
Timers
Sampler
Your sampler executed after Timer, you need to set it before,
Add JSR223 PreProcessor outside Thread Group with your code and the delay value will be set before Timer is executed.
Timer is a scoped element which is executed before each sampler so what happens in your case is that :
JSR223 Sampler is executed after Timer
See:
http://jmeter.apache.org/usermanual/test_plan.html#scoping_rules
http://jmeter.apache.org/usermanual/test_plan.html#executionorder
To fix your issue, set your timers in a setup Thread Group, or if you only want to set it from outside of JMeter, just use function __P
and pass values on command-line:
-Jkey=value
I have put a condition in While controller: ${__javaScript("${status5}" != "SUCCESS" && parseInt("${counter}") < 5,)} and put the counter in while controller. Also enabled the track the counter independently for each user and reset the counter for each thread group iteration.
Once HTTP sampler is called, i have added Beanshell postprocessor to capture the response value in a file.
While running test for 100 threads and 10 iteration, some of the threads fails and retries till 5 times for a iteration but then does progress further. Looks like it is checking only for 1st iteration and then not able to move to next iteration. I dont see any error on the jemter.log or outofmemory but it just hangs there.
Can you please help me why threads are not progressing? Is something wrong in my validation? or in while controller?
You don't need the parseInt() function here, JavaScript is type agnostic so I would recommend changing your condition line to the following:
${__javaScript(("${status5}" != "SUCCESS" && ${counter} < 5),)}
See Using the While Controller in JMeter article for more information on conditional looping in JMeter tests.
I was automating the an application (using Protractor) and I have come across situation where I wanted to select the an option from the type ahead using the DOWN arrow button from the Keyboard. Here is how I am approaching to this action.
After typing part into the text field I am getting the reference of each option that appear in the type ahead.
Now, I am using .each() method of protractor to iterate through each of the option to look for the required option.
I'm making the script to hit DOWN arrow button to iterate through each option in the type ahead.
Suppose there are 10 options displayed in the type ahead and the option that I need to select is at 5th position. Now when I reach the 5th position I am selecting the option but each() function still continues.
I want the loop to terminate when required option is selected. Something like BREAK statement in FOR loops.
BTW I have tried the above scenario with FOR loop but unable to use BREAK statement within then() handler.
Please let me know how to cope up with this situation.
You could throw an exception to terminate the loop. Put the loop inside try and use catch to wrangle your results. You can also just use a boolean variable to indicate that you have found a match and ignore everything after that point. I would just use a for loop though.
Edit:
You could add a variable to hold an action before the allBenchmarks.each
var action
Then inside the test
if(dataValue == optionToSelect){
action = function() {benchmark.click(); ...}
}
After the loop exits call the action
if (action) action()
I've worked with the .Exist method quite a bit, but I recently moved to a new project (now using a WPF application) with QTP 11 (whereas previously I had QTP 10).
Now I'd like to check that a message does not exist by using object.Exist(2). Weirdly, I only get a result after ~23 seconds, instead of the 2 seconds I was expecting.
How does the timeout work? In previous projects, using object.Exist(2) would wait 2 seconds before determining that the object didn't exist. The QTP help file also says it should only wait for 2 seconds (the specified timeout parameter).
Now, it seems as though it's waiting for the Timeout Parameter (2 seconds) AND Object Synchronization Timeout (20 seconds).
Also, Smart Identification is disabled, so it shouldn't be waiting for that. Highlighting the object using the Object Repository instantly says the object doesn't exist.
Has the timeout behavior changed between QTP v10 and v11?
Why does it take so long to say an object doesn't exist?
The Exist method does not work for the last object only.
It works hierarchically - which means this method checks each parent object before checking the last one.
The timeout only works for the last object.
if you want to receive the answer immediately, I suggest you use the following code-
if WPFWindow("x").Exist(0) Then
if WPFWindow("x").WPFButton("y").Exist(0) Then
'action
End if
End if
Make sure you don't have "Smart Identification" enabled for the test object in the Object Repository. That can get in the way.
The additional time that you're encountering is the default timeout setting, which is set to 20 seconds by default. Any Wait or Exist timers will stack on top of the default timeout.
It can be changed in the test settings:
Test Settings > Run > Object synchronization timeout - set in seconds
or in the vbscript:
Setting("DefaultTimeout") = 4000 'set in milliseconds
Using DefaultTimeout function at the beginning of the driver script would be sufficient .
Setting("DefaultTimeout") = 10000 'set in milliseconds
If any object exceeds the timeout limit of 10 seconds as mentioned above then the object will fail to get captured and Run Results will show a failure
I would recommend going by with just the default timeout. Using .Exist(x) will use the mentioned time for each child.