Telerik Forums
Test Studio Forum
1 answer
53 views
hello!

i am using radeditor control. i just given setfocus in js while clicking the button.
it works in ie but it doen't works in chrome.
function setfocus()
{
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();
var edt1=$find("<%=txtmessage.ClientID%>");
edt1.setFocus();
var val=$find("<%=RadEditor1.ClientID%>");
val.setFocus();
}

<asp:button id="send_btn" runat="server" OnClientClick="setfocus()"/>

thanks.
priya.
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();


 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
 function setfocus()
{
//alert("fun");
var edt1=$find("<%=txtmessage.ClientID%>");
//alert(edt1);
edt1.setFocus();



}
Rumen
Telerik team
 answered on 23 Nov 2010
1 answer
87 views
Hi,

              I want to change the time for my calendar reservation of my recorded step. When I edited the step through the Inline editor, it shows only the date which is recorded in the step, time is not showing in the Inline editor to change.

Is there any other way to change the time in the existing step itself?..Attached the screenshot.

Konstantin Petkov
Telerik team
 answered on 23 Nov 2010
1 answer
122 views
I am using Rad tab strip control, I am using 2 tabs in my aspx page. Tab1 I am loading 1.aspx file, Tab2 I am loading 2.aspx file
I am trying to use server side Tab_Click Event for switching tabs which is not firing.
1. Please provide the solution how to use the server side tab_click event.
2. By switching between two tabs , unsaved data on forms should be notified and saved. Is there  any solution for that 
 
Dimitar Terziev
Telerik team
 answered on 23 Nov 2010
1 answer
42 views
Hi guys,

I'm trying to build a custom sitemap but having some difficulties.
The sitemap used to work, but now I have pages that require a user to be logged-in first.

If I use the SiteMap.RootNode and the loop through all the children I dont see the "protected" pages.
So then I used the CmsManager.GetPages() which returns all the pages and thats all good, BUT I need the sitemap to display as it displays in the CMS, in that order.

Now it seems like the "Ordinal" value only applies for a group and the pages in the group or something, I have found a thread where it will sort the pages with the ordinal but the menu is still messed-up and not in the order as it is in the cms.

Can anyone help me on how to sort the items so that they will display as in the admin area?

Here is the code I'm using but does not seem to do exactly what I want( I have just added some custom code that will check if a user may see the page, and only then add it to the List ) :


internal class CmsPageComarer : IComparer<ICmsPage>
    {
        #region IComparer<ICmsPage> Members
 
        public int Compare( ICmsPage x, ICmsPage y )
        {
            return x.Ordinal.CompareTo( y.Ordinal );
        }
        #endregion
    }


private List<ICmsPage> GetSource()
        {
            CmsManager manager = new CmsManager();
            IList pages = manager.GetPages();
 
            List<ICmsPage> source = new List<ICmsPage>();
 
            foreach( ICmsPage page in pages )
            {
                string lang = "en";
                if( Request.Url.ToString().ToLower().Contains( "/af/" ) ) lang = "af";
                int langCode = 0;
 
                if( lang.Equals( "en" ) ) langCode = 127;
                if( lang.Equals( "af" ) ) langCode = 54;
 
                if( IsPageVisibleToUser( page ) && page.Navigable && page.LangID == langCode )
                {
                    //show in menu
                    source.Add( page );
                }
            }
 
            CmsPageComarer comparer = new CmsPageComarer();
            source.Sort( comparer );
 
            return source;
        }


internal class CmsPageComarer : IComparer<ICmsPage>
{
#region IComparer<ICmsPage> Members

public int Compare( ICmsPage x, ICmsPage y )
{
return x.Ordinal.CompareTo( y.Ordinal );
}
#endregion



private List<ICmsPage> GetSource()
{
CmsManager manager = new CmsManager();
IList pages = manager.GetPages();

List<ICmsPage> source = new List<ICmsPage>();

foreach( ICmsPage page in pages )
{
string lang = "en";
if( Request.Url.ToString().ToLower().Contains( "/af/" ) ) lang = "af";
int langCode = 0;

if( lang.Equals( "en" ) ) langCode = 127;
if( lang.Equals( "af" ) ) langCode = 54;

if( IsPageVisibleToUser( page ) && page.Navigable && page.LangID == langCode )
{
//show in menu
source.Add( page );
}
}

CmsPageComarer comparer = new CmsPageComarer();
source.Sort( comparer );

return source;
Ivan Dimitrov
Telerik team
 answered on 18 Nov 2010
1 answer
40 views
Hi guys,

I'm trying to build a custom sitemap but having some difficulties.
The sitemap used to work, but now I have pages that require a user to be logged-in first.

If I use the SiteMap.RootNode and the loop through all the children I dont see the "protected" pages.
So then I used the CmsManager.GetPages() which returns all the pages and thats all good, BUT I need the sitemap to display as it displays in the CMS, in that order.

Now it seems like the "Ordinal" value only applies for a group and the pages in the group or something, I have found a thread where it will sort the pages with the ordinal but the menu is still messed-up and not in the order as it is in the cms.

Can anyone help me on how to sort the items so that they will display as in the admin area?

Here is the code I'm using but does not seem to do exactly what I want( I have just added some custom code that will check if a user may see the page, and only then add it to the List ) :


internal class CmsPageComarer : IComparer<ICmsPage>
    {
        #region IComparer<ICmsPage> Members
 
        public int Compare( ICmsPage x, ICmsPage y )
        {
            return x.Ordinal.CompareTo( y.Ordinal );
        }
        #endregion
    }


private List<ICmsPage> GetSource()
        {
            CmsManager manager = new CmsManager();
            IList pages = manager.GetPages();
 
            List<ICmsPage> source = new List<ICmsPage>();
 
            foreach( ICmsPage page in pages )
            {
                string lang = "en";
                if( Request.Url.ToString().ToLower().Contains( "/af/" ) ) lang = "af";
                int langCode = 0;
 
                if( lang.Equals( "en" ) ) langCode = 127;
                if( lang.Equals( "af" ) ) langCode = 54;
 
                if( IsPageVisibleToUser( page ) && page.Navigable && page.LangID == langCode )
                {
                    //show in menu
                    source.Add( page );
                }
            }
 
            CmsPageComarer comparer = new CmsPageComarer();
            source.Sort( comparer );
 
            return source;
        }


internal class CmsPageComarer : IComparer<ICmsPage>
{
#region IComparer<ICmsPage> Members

public int Compare( ICmsPage x, ICmsPage y )
{
return x.Ordinal.CompareTo( y.Ordinal );
}
#endregion



private List<ICmsPage> GetSource()
{
CmsManager manager = new CmsManager();
IList pages = manager.GetPages();

List<ICmsPage> source = new List<ICmsPage>();

foreach( ICmsPage page in pages )
{
string lang = "en";
if( Request.Url.ToString().ToLower().Contains( "/af/" ) ) lang = "af";
int langCode = 0;

if( lang.Equals( "en" ) ) langCode = 127;
if( lang.Equals( "af" ) ) langCode = 54;

if( IsPageVisibleToUser( page ) && page.Navigable && page.LangID == langCode )
{
//show in menu
source.Add( page );
}
}

CmsPageComarer comparer = new CmsPageComarer();
source.Sort( comparer );

return source;
Ivan Dimitrov
Telerik team
 answered on 18 Nov 2010
4 answers
98 views
When I try to open my solution in Visual Studio, I get errors for each test within the solution:

Error loading C:\[filepath]\test.aii: Object reference not set to an instance of an object.

Any ideas what might cause that?
Cody
Telerik team
 answered on 18 Nov 2010
1 answer
117 views
I have recorded some tests and created a test list based on this. When I run this list on my virtual server by logging in via RDC everything is good untill I close my RDC window (not kill the session) just close the RDC window, the tests seem to stop immediately.

I am running these tests on IE browser. What should I do to avoid this problem?  

Keaegan
Telerik team
 answered on 18 Nov 2010
3 answers
313 views
It seems most people are getting this error in FF but I'm seeing it in IE.  I have a form with a <select ... field. The select uses a DHTML based lookup page to find values to populate the select's options - It can contain more than one value thus the select rather than an input field.  When I record the action everything looks fine.  Playing it back from a test list fails with the error shown below.  When I see the playback in the browser it appears that the click that fires the new window never happens.  There are some look ups of this type on a previous page - multi-page, multi-form process.  The previous lookups are for input fields and those work just fine in the playback.

Unable to find the target host (Browser/SilverlightApp) to locate an element. Failure: System.TimeoutException: Wait for condition has timed out
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo)
   at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.Common.WaitSync.For[T,V](Func`3 func, T target, V custom, Int32 timeout)
   at ArtOfTest.WebAii.Core.Browser.WaitForFrame(FrameInfo frameInfo, Int32 timeout)
   at ArtOfTest.WebAii.Design.Execution.ExecutionUtils.GetFrameBrowserInstance(Browser topBrowser, FrameInfo frame, Int32 waitTimeout, String& stringError)

Any idea on how to sort this out?

UPDATE ...

Did a little more work with this and found something interesting.  The attached image shows the actual vs the expected.  I'm guessing what's happening is the lookup icon, an image of a maginfying glass, is named the same on both page one - expected - and page 3 - actual.  Since they're in different places on the page(s) and have a different url the application is failing to find it.  This is my assumption of course.  Is this the behavior of the application?  If so, how do I defeat this?  Is there something I'm not seeing?

Thanks,
Todd B.
Cody
Telerik team
 answered on 18 Nov 2010
1 answer
83 views
Hi,

              I have downloaded WebUI test studio for Qa edition and recorded the following test using the recorder in IE.
In my project, I have created a new entry in a grid and saved the entry.
Then I stopped the test and saved it.
While executing the test, it is showing the recorded entry in the grid and this execution is created another duplicate entry in the grid.
Each time an duplicate entry is created in the grid while executing the test.

How to resolve the problem?.

thanks
Keaegan
Telerik team
 answered on 17 Nov 2010
2 answers
81 views
Guys - I recorded a script that basically has a grid. I am adding three lines into the grid. Within the grid I have a RadInput box where I need to feed the numbers. By default the RadInput is loaded with a zero. I am deleting the zero and then typing in the value (eg: 300).

Both the deleting of the zero and the typing of the value is recorded. Now sometimes the script executes as 300 and sometimes it executes as 3000 - what should I do to avoid this? I also set the "Clear Before Typing" property to "True" and there is no change. Sometimes the script executes this as 300 and sometimes as 3000. Again I have recorded deleting of the "0" in the script as well.

Any ideas or best practices to accomplish this?

thanks,

Neeraj
Neeraj
Top achievements
Rank 1
 answered on 17 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Rob
Top achievements
Rank 3
Iron
Iron
Iron
Atul
Top achievements
Rank 1
Iron
Iron
Iron
Alexander
Top achievements
Rank 1
Veteran
Iron
Serkan
Top achievements
Rank 1
Iron
Shawn
Top achievements
Rank 1
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?