Telerik Forums
Testing Framework Forum
5 answers
197 views
hello


i already created some tests which use a datasource and also pass it along to "sub-tests", meaning to tests which are executed as a step inside a test. to make my tests modular and use the same test with different data i would like to create a test structure as follows:

i have one big test case which consists of some usual teststeps, custom coded steps and sub-tests.
for example the overall Testcase "mastertest" starts with a subtest "Login" which simply performs a login with given credentials.
the login data is passed from the mastertest to the subtest.
after login i do some some navigation and then call  a subtest called "createCategory".
the "createCategory" performs some actions and uses also data from an excel file but i would like to specific which excel file to use for this specific call. the data for createCategory consists of multiple columns and 3 rows to excecute it 3 times with different data.  this behavior will be used again in createCategory to call another subtest and so on.

for my automatic tests to run i would prepare 3 excel files for the mastertest to cover 3 different use cases. i start the mastertest once which each excel file. depending on the data provided in the excel file different data is passed to the subtests.

Can i set the datasource for each test dynamically? if so could you provide me with a short example?
If this specific approach is currently not possible is there any other way to create modular test with various datasources?
the other option would be to create one test with one datasource, copy this test and exchange the datasource but this would be hard to maintain if tests need to be adapted/extended.


Regards
Cody
Telerik team
 answered on 04 Dec 2010
7 answers
1.1K+ views
Hi,
I want to select from a drop down list using webAii, C#.
Initially the drop down is hidden. After clicking a radio button, drop down control becomes visible. It is set a default value. I need to select a differnt value from it.
Below is the html
<input type="hidden" name="firstnameId" value="" />
<select class="name_selector" name="firstnameId" id="namesetselector">                               
   <option class="name_selector_option" value="1">Sam</option>
   <option class="name_selector_option" value="2">Mark</option>
   <option class="name_selector_option" value="3">Sean</option>
</select>

The code I have written is,
HtmlSelect name = AB.Find.ByAttributes<HtmlSelect>("class=name_selector");
name.SelectByValue("3");

When I click the radio button and the drop down list becomes visible, by default the first option is selected. The above c# code that I have written actually selects the 3rd option in the drop-drown. Later on when I submit the page and open it, the option selected is the default one i.e. the first one. Is there a reason to this? When I do this operation manually it works fine.
Thanks
Stoich
Telerik team
 answered on 01 Dec 2010
11 answers
164 views
Hi,

  I have some Silverlight UI Automation tests running correctly on my local machine, however, on the build machine, I keep run into "ArtOfTest.WebAii.Silverlight.ApplicationNotReadyException" as it navigates to the url properly but failed to execute any steps within Silverlight.

  I have attached the .trx file.

  Any ideas?  


Cody
Telerik team
 answered on 26 Nov 2010
1 answer
91 views
Hi there.
I have a datagrid that doesn't seem to be updating after a row has been removed dynamically.  This is incredibly frustrating.  I saw that this is an existing problem in some of the other post so I was wondering when there will be a fix for this?  

I wonder if this is a problem when there are multiple grids on the same page.  This was working fine on a page that only had one grid.  

Is there anyway to get around this problem?

Thanks.
Cody
Telerik team
 answered on 24 Nov 2010
1 answer
190 views
After reorganising my UnitTest project I now receive the message:

"Unable to load WebAii Test Template. Please make sure templates are loaded." when trying to convert my .aii test into a MSUnit test.

The conversion succeeds, but changes the test to a .vb file as opposed to a .cs file, as is specified in the Settings.aiis file in the same folder as the .aii test I am converting.

Where is the templates location set and how can I change it to allow the project to find the settings again?

Tom
Keaegan
Telerik team
 answered on 24 Nov 2010
0 answers
181 views
Ignore, I've figured it out.
automation
Top achievements
Rank 1
 asked on 22 Nov 2010
8 answers
220 views
Hello,

unfortunately the Download Dialogues aren't handled proper within my Application. Here is a code snippet:

Settings mySettings = new Settings(BrowserType.FireFox, @"C:\browserlog\");
            Manager myManager = new Manager(mySettings);
            myManager.Start();
            myManager.LaunchNewBrowser();
            myManager.ActiveBrowser.NavigateTo("http://www.c-c-center.de/nuetzliches/exceluebungen/index.htm");
            myManager.ActiveBrowser.Find.ByContent<HtmlControl>("x:Kunden.xls").Download(false,DownloadOption.Save,"C:\\test.xls",5000);
With this, the Firefox open dialogue pops up for a short moment and then disappears. After five seconds I get the TimeoutException. In the log file stands this line:
"Unexpected dialog encountered. Closing the dialog, and halting execution".

I've also tried this code with the same result:

Settings mySettings = new Settings(BrowserType.FireFox, @"C:\browserlog\");
Manager myManager = new Manager(mySettings);
myManager.Start();
myManager.LaunchNewBrowser();
Element elem = myManager.ActiveBrowser.Find.ByContent("x:Kunden.xls");
string saveLocation = "C:\\test.xls";
DownloadDialogsHandler handler = new DownloadDialogsHandler(myManager.ActiveBrowser, DialogButton.SAVE, saveLocation, myManager.Desktop);
myManager.ActiveBrowser.Actions.Click(elem);
handler.WaitUntilHandled(5000);

After calling "handler.WaitUntilHandled" the Open Dialogue disappears and after five seconds I get the TimeOutException.

The same problem occurs with Safari. I've also checked my Firefox configuration and configured it this way, but it didn't help:
http://www.artoftest.com/support/webaii/topicsindex.aspx?topic=configurefirefox2x3x

Do you have any idea what's wrong? I've attached my Firefox Open Dialogue.

I would really appreciate your help.

Many thanks
Thomas
Cody
Telerik team
 answered on 17 Nov 2010
2 answers
107 views
I've been looking for a list of changes or additions with this version but haven't been able to locate a list.  I was able to find the version notes link which points to http://www.telerik.com/versionnotes.aspx?id=2340 however at the moment the page is blank.  Anyone know where the version notes might be found?
Mike
Top achievements
Rank 1
 answered on 15 Nov 2010
1 answer
1.3K+ views
Hi guys,
Is there a good way to check the position of an element?  e.g. if I have two buttons on a page how can I find out which button is on the left and which one is on the right? or top and bottom?

So far I have found that whichever element is on the left (and I think created first in the visual tree) has a lower AbsoluteTagIndex.  But that really only says which element came first.  So I'm wondering if there's a better way.  

I would love to hear any suggestions about this.  

Thanks.
Stoich
Telerik team
 answered on 15 Nov 2010
1 answer
133 views
Hi!

I was unable to find any examples of converting code that uses FindParam to HtmlFindExpression.  I make extensive use if FindParam but with the latest revision 2010.3.1109 I found that it's being depricated.

Here is an example of how I use FindParam:

 

FindParam findParam = new FindParam("input", 3, "type=checkbox");

 


However, HtmlFindExpression doesn't allow the use if the tagname or index like FindParam.  Can you point me to examples of converting ot the new way?

Thanks,

George
George McCarroll
Top achievements
Rank 1
 answered on 12 Nov 2010
Narrow your results
Selected tags
Tags
+? more
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Simon
Top achievements
Rank 2
Iron
Iron
Bob
Top achievements
Rank 3
Iron
Iron
Veteran
Marco
Top achievements
Rank 4
Iron
Iron
Iron
Grant
Top achievements
Rank 3
Iron
Iron
Iron
Kao Hung
Top achievements
Rank 1
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?