This is a migrated thread and some comments may be shown as answers.

[Solved] Regarding Tag's parameterization

12 Answers 65 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Hima Sailaja
Top achievements
Rank 1
Hima Sailaja asked on 10 Mar 2010, 01:37 PM

Dear Team,

In my application, I am trying to automate a customized tree element.

When I am trying to capture the node of window it is displaying Node as Tag.

(Please check the screenshots)

I am trying to parameterize such values to achieve advance to scenarios.

Please help in this issue

Thanks and regards,

Sailaja

12 Answers, 1 is accepted

Sort by
0
Missing User
answered on 10 Mar 2010, 05:22 PM
Hi sailaja,

Unfortunately, there is not a way to parameterize clicks by default in WebUI Test Studio. We would have to go to a custom coded step solution like as the following:  

[CodedStep("MyCustom Step Description")] 
public void MyCustomStep() 
  HtmlControl c = ActiveBrowser.Find.ByExpression<HtmlControl>("TextContent=" + Data["ColumnName"]); 
  c.Click(); 
}

Please insert this step in the postition in the test you wanted it to execute. The code will find items on the page by text content and be data driven using the 'ColumnName' from the built in datagrid, a .csv file, or a table in a database.

So from your screenshots, please try entering 'test_2' and 'Test_Tech_Group' on your data source. If the code does not work, please try chaning the "TextContent=" string to "InnerText=" and see if this works better.

Pleae post back if you have any further questions on this or if it does not work out for you.

Kind regards,
Nelson Sin
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hima Sailaja
Top achievements
Rank 1
answered on 11 Mar 2010, 11:35 AM

Dear Team,

I tried with your solution.

The added script line is executed as pass, but the action is not taken in place.

For more information I added the below mentioned screenshots which display how the code appears and the base classes of code in project.cs file.

Please help me to resolve this issue.

Thanks in advance
Sailaja

0
Cody
Telerik team
answered on 11 Mar 2010, 03:44 PM
Hi Sailaja Hima,

In the tag-validation.gif screen shot I see one possible problem and one definite problem:

  • First, the "[codedStep("MyCustome Step Description")]" line has been commented out. Maybe that is intentional. With it commented out like this, WebUI won't see it and, therefore, won't attempt to execute it. If you do not want that coded step executed at all, then this is normal, not a problem.
  • Second, the yellow vertical bar on the left tells me the file has not been saved. Until you actually save the file, WebUI doesn't try to evaluate it and add the coded step to Test Explorer. Once you save it, the new coded step will appear as a test step. It will be added as the last step in the test. So you may need to drag and drop it to the right location.

I've attached your screenshot modified with the problem areas circled.

Kind regards,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hima Sailaja
Top achievements
Rank 1
answered on 12 Mar 2010, 01:24 PM

Dear Cody,

I tried with your suggestions; Between I got some object reference error (Please check screen shot1)

Then I tried with exception handling method. The test got executed successfully, but the action not triggered. I find error messages in console window. (Please check screenshot 2)

Please help in this issue,

Thanks and regards,

Sailaja

0
Missing User
answered on 12 Mar 2010, 05:22 PM
Hi again sailaja,

From the screenshots, it looks like the control references in the code are not being populated with anything from the page Dom.

I based the code I posted based on the screenshots from your first post and it looks like the tree is not in an IFrame. If you could please reply back and verifiy that this is the case.

Also, if you can highlight a node in the tree, say 'test_2', and when the Tool Menu appears select Locate in Dom. In the Dom Explorer Window, please do the following: 

-undock the window in Visual Studio
-maximize the window as much as possible so that is shows the complete tag for the tree node
-expand all child and parent nodes for the 'test_2' element in the Dom Explorer window
-take a screenshot and send it to us

Using the Dom Explorer, you can see how WebUI interprets the page Dom, then use this information to edit the FindExpression code based on this (to find by attributes, etc).

If you can post this and also when would be a good time for you to have a Live Meeting. In a Live Meeting, we could work on an example case you can use for your other test cases.

Regards,
Nelson
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hima Sailaja
Top achievements
Rank 1
answered on 17 Mar 2010, 08:51 AM
Dear Team,
Find the attached screen shots.
Please let me know if more information required, so that we can plan for livemeeting.

sailaja
0
Konstantin Petkov
Telerik team
answered on 17 Mar 2010, 08:59 AM
Hi Sailaja,

The attachment is missing for some reason. Can you please try attaching it again?

Greetings,
Konstantin Petkov
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hima Sailaja
Top achievements
Rank 1
answered on 17 Mar 2010, 09:06 AM
0
Missing User
answered on 17 Mar 2010, 08:56 PM
Hello again Hima,

Thanks for the screenshots. It looks like there maybe a few issues with how the controls are laid out in the Dom.

It will require some tweaking with the code I posted in a previous reply, so I believe a Live Meeting will resolve this more quickly.

Please reply back when would be the best time for you to meet.

All the best,
Nelson
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Hima Sailaja
Top achievements
Rank 1
answered on 18 Mar 2010, 12:58 PM

Dear Team,

Thank you for information. Can we schedule our live meeting on Friday in between 8 PM- 9 PM (In India).(i.e.March 18, 2010)

 Please let us know Your availability.
Thanks in advance,

Regards,
Sailaja

0
Cody
Telerik team
answered on 18 Mar 2010, 02:32 PM
Hello Hima Sailaja,

Yes, Nelson is available at that time. which is 9:30am our local time. Nelson will setup the live meeting.

Regards,
Cody
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
0
Missing User
answered on 19 Mar 2010, 03:23 PM
Hello again Sailaja,

I just got the message about activation problems. If you'd like, I can try to help out with this also.

We could either work on the activation and the dynamic clicking at the scheduled meeting time today or on Monday, which ever you prefer. Or we can try to resolve this on the ticket system if you could post back with a description the problem.

When activating, please use an account that is part of the Admin Group for the machine. As a last resort, please try activating using the Admin account that was created when Windows was first installed.

Best wishes,
Nelson
the Telerik team

Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Public Issue Tracking system and vote to affect the priority of the items.
Tags
General Discussions
Asked by
Hima Sailaja
Top achievements
Rank 1
Answers by
Missing User
Hima Sailaja
Top achievements
Rank 1
Cody
Telerik team
Konstantin Petkov
Telerik team
Share this question
or