"can't access dead object" error selenium IDE - selenium-ide

So before someone suggests there are already plans to migrate this IDE project to Webdriver, but this will not happen for a while. So for the time being I am forced to maintain these IDE scripts.
We are rolling out a new UI on our page and I was fixing the tests to work with the new model. The model is in an iframe here is my code
<tr>
<td>selectFrame</td>
<td>id=iframeAuthorizeNet</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>id=txtCardNum999</td>
<td></td>
</tr>
... Do some work in the model
<tr>
<td>click</td>
<td>id=btnSavePaymentItem999</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>10000</td>
<td></td>
</tr>
<tr>
<td>selectFrame</td>
<td>relative=top</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=PageContent_page_payment_lnk</td>
<td></td>
</tr>
<tr>
<td>waitForElementPresent</td>
<td>link=Delete</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>css=button.btn.btn-red</td>
<td>Update</td>
</tr>
<tr>
<td>click</td>
<td>css=span.card-display.row > a</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>2500</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>css=button.btn.btn-red</td>
<td>Add</td>
</tr>
<tr>
<td>verifyText</td>
<td>id=PageContent_page_headTitle_lbl2</td>
<td>Update Payment Information</td>
</tr>
<tr>
<td>click</td>
<td>id=PageContent_page_transactions_lnk</td>
<td></td>
</tr>
<tr>
<td>verifyText</td>
<td>id=PageContent_page_recentChargesTitle_lbl</td>
<td>Charges</td>
</tr>
<tr>
<td>openAndWait</td>
<td>${BaseURL}/aboutus.aspx</td>
<td></td>
</tr>
So the issue is with the openAndWait this call is always giving me a `Can't access dead object" error. I tried changing this to a click on the element that would take me to the new page and this also triggered the error. All calls after these work fine and I can even see when I watch the test that the click command worked and the page navigated but it was still reported as "Can't access dead object" so my test still appears to have failed.
Some other useful information I am only encountering this issue when ran on the standalone server (2.53.1). When I run the tests through the Firefox plugin everything works fine.
Has anyone else ran into this? Seems to me to be related to the page change.

Related

Magento email being sent in text format instead of HTML

I am abel to test my emails under system>transactional emails.
My email looks correct when i click on the preview button, but when i send it out and recieve the email the email comes in as text only. so all i see is the html code wich deffinitley NOT what i want. Any reason why my email shows up correctly under preview but not when it is actually sent out?
Below is what my template looks like in the Magento add email template.
{{template config_path="design/email/header"}}
{{inlinecss file="email-inline.css"}}
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td>
<table cellpadding="0" cellspacing="0" border="0">
<tr>
<td class="email-heading" style="text-align: left;">
<p><strong>Name:</strong> {{var data.name}}</p>
<p><strong>Email:</strong> {{var data.email}}</p>
<p><strong>Telephone:</strong> {{var data.telephone}}</p>
<p><strong>Service Requested:</strong> {{var data.service-requested}}</p>
<p><strong>Comment:</strong> {{var data.comment}}</p>
</td>
</tr>
</table>
</td>
</tr>
</table>
{{template config_path="design/email/footer"}}

GWT Sample Application

I'm new to GWT. I created sample application in eclipse. I removed <h1>Web Application Starter Project</h1> from HTML file in war but when I debug that application its shows that text on web page. I cleaned project and also compiled it but its not working. Will you guys please tell me what I'm doing wrong. Part of HTML page
<!-- <h1>Web Application Starter Project</h1> -->
<table align="center">
<tr>
<td colspan="2" style="font-weight:bold;">Please give your name:</td>
</tr>
<tr>
<td id="nameFieldContainer"></td>
</tr>
<tr>
<td id="sendButtonContainer"></td>
</tr>
<tr>
<td colspan="2" style="color:red;" id="errorLabelContainer"></td>
</tr>
</table>
If you are using Eclipse with Jetty, you should stop your application. Then clean your GWT project, build it and start again your application. Finally refresh your browser. You have to do this every time your edit static resources such as HTML files.

stuck at clickAndWait in selenium ide

A recorded test script includes a google search.
After clicking on "Google Search", the next action was to click on a link in the test results, however during playback this happens before the browser has loaded the results,
it stop after search value
here is the code
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=gbqfq</td>
<td>citibank india</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Citibank India: Bank Accounts, Credit Cards, Home / Personal Loans ...</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
if any can advise thanks
I've found it's better to use a click, and then have a waitForElementPresent for the next command to make sure the next page is loaded.
Klendathu

Selenium IDE [error] Element id=cmp_admin not found

I am using selenium IDE 1.9.0 to record a test.
Please advise me what I didn't wrong and how to fix the problem.
here are the steps that i am taking to record the test.
1.I logged into the site with username and password
2.I navigated to search member page to type in the member's name, click on the name link the system lead me to the member profile page.
The script stopped at this line:
ClickAndWait id=cmp_admin
the first time I played script it runs without any error. The run the script on after 8 hours, it prompts me the following error:
[error] Element id=cmp_admin not found
I used the debug function to see what went wrong. Here are the messages displayed in the debug pane:
[debug] modifySeparateTestWindowToDetectPageLoads: already polling this window: selenium1365079281311
[debug] getCurrentWindow newPageLoaded = false
[error] Element id=cmp_admin not found
[debug] commandError
[debug] testComplete: failed=true
Here is the html code generated by Selenium IDE
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=nd_home</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>id=cmp_admin</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=quicksearch_anchor</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>css=img[alt="Member"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=search_name</td>
<td>suzy</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Balagia, Suzy</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
If you click on any button or link after clicking some time is taken to load page, if page is not load completely then selenium ide do not found ID or name of next element. To resolved such type of issue used Pause , waitfortext, clickandwait command
I make some changes in the code please run and let me know it work for you or not.
<tr>
<td>open</td>
<td>/</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=nd_home</td>
<td></td>
</tr>
<tr>
<td>pause</td>
<td>1500</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>id=cmp_admin</td>
<td></td>
</tr>
<tr>
<td>click</td>
<td>id=quicksearch_anchor</td>
<td></td>
</tr>
<tr>
<td>clickAndWait</td>
<td>css=img[alt="Member"]</td>
<td></td>
</tr>
<tr>
<td>type</td>
<td>id=search_name</td>
<td>suzy</td>
</tr>
<tr>
<td>clickAndWait</td>
<td>link=Balagia, Suzy</td>
<td></td>
</tr>
</tbody></table>
</body>
</html>
It could be a couple of things. First, is the element you're looking for (id=cmp_admin) on the page and still called cmp_admin? From your code, it looks like you have to click on id=nd_home, then a page loads that contains cmp_admin. If that's the case, most likely the page hasn't finished loading so the element isn't there yet. Try using a waitfor command between the click on nd_home like this:
click | id=nd_home |
waitForElementPresent | id=cmp_admin |
clickAndWait | id=cmp_admim |
You could also try a pause, waiting a couple of seconds, but I find waitfor commands to be less fragile, especially if you have lots of Ajax requests or elements that have to load.
Klendathu

form get method not working in opera browser

Why forms submited using get method is not working in opera browser?
<form method="get" action="">
I am submiting to same page
<form method="get" action="">
<table class="search_form_table" width="428" cellpadding="0" cellspacing="0" border="0" >
<tr>
<td width="150">Order Number</td>
<td><input name="order_number" /></td>
</tr>
<tr>
<td>Start Date</td>
<td><input class="search_date_fields" name="date_from" /> End date : <input class="search_date_fields" name="date_to" /></td>
</tr>
<tr>
<td colspan="2" align="right"><input class="subimit_button search_button_width" type="submit" value="Submit" /></td>
</tr>
</table>
</form>
If this is the same problem I thought I had, it's not that GET doesn't work. It's because the browser hides the form name/value pairs in the query string in the Location bar. If you actually go to the location bar and hilite the URL that you submitted to, you'll see the form parameters in the query string. I hate this, but it is the way Opera does it. :-/
submitting GET forms certainly works in Opera. Copying this code to a file and submitting it creates exactly the same URL as in Chrome. Hence, your problem must be something else. Without more information it's impossible to tell what your problem really is.