Wait For Object Clickable in Truclient Vugen script - performance-testing

In TruClient Vugen script is it possible to wait for a Button to become clickable.
Currently in my script I am waiting for an object to exist, but its not very stable and some transactions keep failing because of it.
Please help on the logic to wait for an element until it becomes clickable.

how about using TruClient Descriptors as ID method? In case the element contains indication for when it is clickable (e.g. Class, Attribute, etc.) you could use that indication for object identification. TruClient should identify the object once the attribute is set and resume.
Another option could be to create some kind of click retry mechanism in order to execute the click once the button is clickable:
Use the same "Wait for Object" step and add "For Loop" step with certain number of iteration (i.e. retries) right after.
Inside the for loop you could use the following steps:
1. Click step
2. Wait for Object (next object that should appear)
3. Catch step with "Object Identification" as argument and internal "Flow Control" - "Continue" step
4. "Flow Control" - "Break" step
In case the object is clickable, steps 2-3 should pass and step 4 would break the loop.
In case the object is not clickable, step 2 should fail with object identification error which would trigger step 3 and the internal continue step in order to try the click again. You can space out the retries by adding a simple wait step inside the catch block.

Related

Check if a webelement is "clickable" before you click it - Selenium VBA

Forgive what is potentially an obscure question.
In the webtable displayed below the following code will click on the highlighted radio button and fire the JS associated with its "click" event.
Set myEle = ch.FindElementById("__M5_1_1_image")
myEle.Click
For reasons I will not bore you with, I am trying to write a function which will check if you can click on this (or another candidate webelement in the table) WITHOUT actually clicking on it as I do not want to fire the associated "click" event at this stage of the code. However, I do want to know that the webelement I have specified will not throw an error or produce no event when I do click it later.
I have tried .ClickAndHold and .ReleaseMouse as tests to see if the same potential errors are returned as with the use of .click, but this does not work. For example I can get a "Element not interactable error" with .click but no error with the other 2.
Going back to the webpage I notice that this (and all the other tables I want to apply this function to) change the mouse cursor from an arrow to a "pointing hand" graphic when you hover the mouse over the correct element (e.g. radio button image in this example). Hence, one method would be to look for the presence of the "mouseover" event in the list of event listeners for the specific webelement - as highlighted right lower pane of the image. Unfortunately I don't have any idea how to check the "event listeners" associated with a defined webelement using selenium and VBA. For example if I fire the mouseover event for a webelement would it return an error if no such event existed or would there merely be no action? I assume it is the later, so can anyone tell me if it is possible to query whether a specific event is associated on the webpage for a defined webelement?

How to click on ::before element (groovy, JMeter)?

I work on client-side in JMeter with groovy and have this situation:
To make SUBMIT button active, I just need to emulate checking this checkbox on previous step in the script.
Could you please let me know, what are the ways to point to / switch on this checkbox, using this ::before element?
Neither
//input[#class='checkbox' and #name='Information']
wait.until(ExpectedConditions.elementToBeClickable(By.xpath("//input[#class='checkbox' and #name='Information']")));
WebElement checkbox_Information = driver.findElement(By.xpath("//input[#class='checkbox' and #name='Information']"));
checkbox_Information.click();
nor
//label[#class='checkbox-label' and #for='Information']"
could help - in both cases here are error messages, for example:
Response message:javax.script.ScriptException: javax.script.ScriptException: org.openqa.selenium.TimeoutException: Expected condition failed: waiting for element to be clickable: By.xpath: //input[#class='checkbox' and #name='Information'] (tried for 30 second(s) with 500 milliseconds interval)
The chance of getting a comprehensive response will be much hire if you:
Don't post code as an image
Provide these "errors messages"
Show (at least partially) your code
So far if you're talking about JMeter's WebDriver Sampler you can try:
Ensuring that the checkbox is visible, not covered by popups and clickable
Usu an Explicit Wait to ensure that the checkbox can be interacted with
And if nothing helps as the last resort you can "click" the checkbox using JavaScript, something like:
WDS.browser.executeScript('document.getElementById("Information").click();')

Blue prism - Scrolling a web page

Is there any way that we can scroll down in a webpage till an element where we want any verification or want to enter values ?
Another question is that I used global send keys to scroll a page. It works in object studio if I provide an interval of 0 (as inputs set tends to Yes), but from process studio I get an error as follows
"Internal : Failed To perform Step 1 In Navigate Stage 'Trying scroll' on page 'Select hotel' - Special characters (~{}+^%) are not supported in SendKeys if an interval value is provided. Separate calls can be used to send control characters."
how to overcome such situation ?
Try removing the interval = 0. If this doesn't work, can you please share a screenshot of your action inside the object and the Navigation stage that you are using to send keys?

Any new arrangement for select_list in WATIR 6.0.2 waits until options got populated?

I have a question about select_list which got populated in run time according to the option of some other select list.
For an example If I choose motor car make in my select_list, then model select_list got populated. but the problem is, I have to wait for few seconds before I interact with model select_list otherwise it throws the error no options present(because it takes some time to populate). I find very interesting thing in WATIR 6.0.2 like
b.link(:id,'NewContactNewGenFromMenu_Link').wait_until(&:visible?).click
which first confirm the element present through implicit wait using when_present, then it waits until element visible, this is amazing change. But Is there anything to check whether select list options got populated? Is any new arrangement?
It looks like there is no change to the Select#select method in Watir 6.0.2 - ie it does not wait:
browser.select_list.select('changed_text')
#=> Watir::Exception::NoValueFoundException
You can get an implicit wait if you locate/select the option directly:
browser.select_list.option(text: 'changed_text').select
I think the wait functionality should be added to the #select and #select_value methods. I have opened Issue 503 to request the functionality.

How to sequence a custom action script after a specific dialog?

I have created a basic MSI project using InstallShield, I want to run a custom action script between two dialogs.
This shows my execute sequence, I want to move the custom action MyCustomActionScript to between the two dialogs indicated by the arrow.
How can I do this? Do I need to change things around somehow so that the dialogs are not nested (this is the way they are created naturally)? Or do I have to do something else, like run a DoAction on the target dialog? If so, will the execute sequence automatically move to the next dialog upon completion of the script, or do I have to script something to move the execution?
(Note that the script is a simple manipulation of the INSTALLDIR property, nothing complicated.)
Only the first dialog of the wizard loop is in the UI sequence. The rest are invoked by NewDialog control events. You want to look into the DoAction control event to invoke your custom action.
Custom actions scheduled in this fashion should only perform data acquisition / validation. Changes to the machine state should only occur in the execute sequence.
To run an action between LicenseAgreement and InstallSettings, you must indeed set up a control event DoAction. In this case you would add the DoAction on the behavior of LicenseAgreement's Next button so that it is invoked in the same scenarios that the Next button's NewDialog takes you to InstallSettings.

Resources