Development

I’m using LDTP to write a GUI test case script in python. I’m running the script in a virtual machine by nosetests.

And I get a block with the error of unable to find window X, while window X is absolutely displayed on the monitor. This error always occurs after LDTP actions.

Example:

After I open my subscription manager in the virtual machine (rhel6.8), I could find the subscription manager by calling getwindowlist():

>>> getwindowlist()
[‘frmTopExpandedEdgePanel’, ‘frmBottomExpandedEdgePanel’, ‘frmroot@localhost:~’,
‘frmx-nautilus-desktop’, ‘frmSubscriptionManager’]

Then I use getobjectlist() to do some action:

>>> getobjectlist(‘frmSubscriptionManager’)
[‘flr8’, ‘flr4’, ‘mnuAbout’, ‘flr6’, ‘flr7’, ‘flr0’, ‘flr1’, ‘flr2’,
‘flr3’, ‘ukn2’, ‘ukn3’, ‘ukn0’, ‘ukn1’, ‘scpn1’, ‘scpn0’, ‘scpn3’, ‘scpn2’,
‘lblStatus1’, ‘lblContract’, ‘ptl0’, ‘flr5’, ‘txtStartEndDateText’,
‘tblBundledProductsTable’, ‘scbr0’, ‘mnuRedeemSubscription’,
‘tchEndDate’, ‘lblStatus’, ‘mnuSystem’, ‘mnuRegister’, ‘tchStartDate’,
‘lblSKU’, ‘txtSKUText’, ‘txtProvidingSubscriptionsText’, ‘tchQuantity’,
‘txtSupportTypeText’, ‘ttblMySubscriptionsView’, ‘mnuEmpty’,
‘txtArchText’, ‘mnuConfigureProxy’, ‘txtSupportLevelAndTypeText’,
‘mnuHelp’, ‘mnuOnlineDocumentation’, ‘lblStart-EndDate’, ‘mbr0’,
……etc]

The window disappeared, even though it was still displayed on my virtual machine’s monitor.

>>> getwindowlist()
[‘frmTopExpandedEdgePanel’, ‘frmBottomExpandedEdgePanel’, ‘frmroot@localhost:~’, ‘frmx-nautilus-desktop’]

Why does this error occur, and how should I deal with this situation in an automated test?

In my script below code when Thread.sleep() is not used, then it throws an exception “element click intercepted: Element <button _ngcontent-yyo-c131=”” class=”btn btn-sm btn-light border ml-3″>…</button> is not clickable at point (226, 567).
When using the Thread.sleep() it runs and clicks on the Next button, but the problem is that in my application total 9 times next button should be clicked.
For that I printed message on the log so here only 6 times message gets printed (‘btn50-400clicked’) and then next button is disabled and unable to proceed to next code.
Even after waiting for up to 30 minutes it’s not working.
How do I resolve it?
var next=WDS.browser.findElement(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”))

while(next.isEnabled())
{
java.lang.Thread.sleep(9000);
//var wait15=new org.openqa.selenium.support.ui.WebDriverWait(WDS.browser, 20000)
//wait15.until(org.openqa.selenium.support.ui.ExpectedConditions.invisibilityOfElementLocated(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”)))
var wait9 =new org.openqa.selenium.support.ui.WebDriverWait(WDS.browser, 9000)
wait9.until(org.openqa.selenium.support.ui.ExpectedConditions.elementToBeClickable(pkg.By.xpath(“//button[contains(@class,’btn btn-sm btn-light border ml-3′)]”))).click()
//next.click();
WDS.log.info(‘btn50-400clicked’)

}
WDS.log.info(‘btn2clicked’)
//java.lang.Thread.sleep(3000);
if(!next.isEnabled()){
WDS.log.info(‘Next button disabled’)}

I am looking for a solution for the below problem statement:

Authentication is done through ADFS.
I recorded a script via jmeter/blazemeter/badboy, but observed that RequestSecurityTokenResponse is never returned in response for any request.
Observed that the RequestSecurityTokenResponse is directly sent over a URL via reply by ADFS.

Due to above situation I am not able to extract the RequestSecurityTokenResponse and hence I’m not able to parameterize it.