GWT Sample Application - gwt

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.

Related

"can't access dead object" error 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.

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"}}

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

Error occuring related to build path in eclipse for Spring MVC application

I am building MVC CRUD application. In JSP file I got this error
The tag handler class for "fmt:message"
(org.apache.taglibs.standard.tag.rt.fmt.MessageTag)
was not found on the Java Build Path
Here is my JSP file at the line "fmt:message"
<%# include file="/WEB-INF/jsp/include.jsp" %>
<%# taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
<title><fmt:message key="title"/></title>
<style>
.error { color: blue; }
</style>
</head>
<body>
<h1><fmt:message key="addprod.heading"/></h1>
<form:form method="post" commandName="addprod">
<table width="95%" bgcolor="f8f8ff" border="0" cellspacing="0" cellpadding="5">
<tr>
<td align="right" width="20%">Add a new Product: (Please enter ID for the new product) </td>
<td width="20%">
<form:input path="productID"/>
</td>
<td width="60%">
<form:errors path="productID" cssClass="error"/>
</td>
</tr>
<tr>
<td align="right" width="20%">Add a new Product: (Please enter name for the new product) </td>
<td width="20%">
<form:input path="productname"/>
</td>
<td width="60%">
<form:errors path="productname" cssClass="error"/>
</td>
</tr>
<tr>
<td align="right" width="20%">Add Price: (Specify price in number) </td>
<td width="20%">
<form:input path="productprice"/>
</td>
<td width="60%">
<form:errors path="productprice" cssClass="error"/>
</td>
</tr>
</table>
<br>
<input type="submit" align="center" value="Add">
</form:form>
Home
</body>
</html>
Kindly guide me how to solve it. I added all the jars related, But could not understand the error exactly. Thanks
I see two potential problems.
Regarding the specific error you're seeing, you need to ensure
the appropriate tag library is on your build path. In Eclipse,
right-click your project and select "Properties". In the dialog that
pops up, select "Java Build Path". The window should display tabs
representing the various kinds of libraries you can add to your
project. One of those tabs should list the "JSTL" library--my
projects, for instance, use jstl-1.2.jar. If you don't see it in
any of the libraries on your build path, you may need to add it
manually by copying it to your project's external library folder and
adding the JAR manually to your build path.
See: http://wiki.eclipse.org/FAQ_How_do_I_add_an_extra_library_to_my_project%27s_classpath%3F for more info.
After you add the library to your build path, you still have to
make sure that the tags it contains are available to your specific
JSP. In your example, you have:
<%# taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
That allows you to use Spring's form tag library in your current JSP. I do not see a similar declaration for the fmt library, which I would expect to look something like:
<%# taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>
It's possible that you've got that in your include.jsp file; if so you should be fine.
Hope this helps.