Telerik Forums
Test Studio Forum
1 answer
113 views

Hi,

I was trying to look for a Kendo Menu to click on using C# code but I keep hitting error "System.NullReferenceException: Object reference not set to an instance of an object."

The DOM where the element is located is as per the attached image.

I tried using the element reference from Element Repository to perform actions but I keep hitting error:

1.Pages.Home.Menu_Setup.MouseHover(0, 0, ArtOfTest.Common.OffsetReference.AbsoluteCenter);
2.Pages.Home.Menu_Setup_Contract.MouseHover(0, 0, ArtOfTest.Common.OffsetReference.AbsoluteCenter);
3.Pages.Home.Menu_Setup_Contract_MasterPriceList.Click(false);

 

Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[Coded_Master_Price_List_CodedStep1] : Master Price List Entry'.
InnerException:
System.ArgumentException: Invalid tag name 'span' for this control. Control was expecting 'li'

 

Then the code is amended based on the documentation here to try looking for the element's parents and perform clicking:

1.IList<KendoMenuItem> itemList = ActiveBrowser.Find.AllByAttributes<KendoMenuItem>("role=menuitem");
2.HtmlFindExpression li = new HtmlFindExpression("title=SETUP","innertext=~Setup");
3.li.AddHierarchyConstraint(new HierarchyConstraint(new HtmlFindExpression("role=menuitem"), -1));
4.KendoMenuItem menuSetup = Find.ByExpression<KendoMenuItem>(li);
5.menuSetup.Click();

 

Then the error is hit:

Failure Information:
~~~~~~~~~~~~~~~
Exception thrown executing coded step: '[Coded_Master_Price_List_CodedStep1] : Master Price List Entry'.
InnerException:
System.NullReferenceException: Object reference not set to an instance of an object.

 

Can I please ask for help on which part is wrong in this code?

Thank you.

 

Plamen Mitrev
Telerik team
 answered on 15 Sep 2020
6 answers
112 views
Hello

I have a that call a test as a step. I've noticed that there are no storyboards recorded for the step as a test part.  I've also tried to recapture and it does recapture the storyboard images, but not the step test parts of it.

For example, I have another test that calls a navigation/login step test which is the same although with that one I can run the first step by itself to get the images, then run the next part to continue.  Annoying but doable. 

I have another test that is reversed, ie does a login and then calls a step to do the rest.  There is no obvious way I can capture the step images after the login part is done.

I would expect that I should be able to view all images that are part of a test, whether the steps are part of the test or are called in it from another test.

Also, it would be very handy to be able to click through to a test step rather than having to go back to the project tab each time.

Thanks
Cristal
Top achievements
Rank 1
 answered on 14 Sep 2020
4 answers
93 views

The August update has not worked well for me so I've been doing allot of uninstalls followed by cleaning of data folders.  For the most recent uninstall I also removed Mondo and it's data.  But after the reinstall, the one test I had scheduled (because I had to redo them ALL) was still there.  So I was wondering that I'd not removed all of the data in the last uninstall.

Because in the first uninstall of the March update followed by the install of the August update, I lost all my scheduled tasks.  But after doing the more thorough 2nd uninstall mentioned above, the one item I had scheduled was there. 

1. Removed March
2. Installed August - all prior scheduled tasks (12) are gone - BOO
3. Add one task
4. Encountered unrelated problem adding second task
5. Thorough uninstall, including Mondo and Progress Program Data
6. Installed August - the one scheduled task from step 3 was still there - HOW?

So it stinks that I can't backup or somehow save scheduled tasks and strange that when I don't need to retain them that they are magically retained.

 

Plamen Mitrev
Telerik team
 answered on 11 Sep 2020
1 answer
154 views

Hello,

I'm needing a smidge of help on this one :) 

I am looking to obtain a div after the innertext of a specific h5.  as you can see below.  I have an h5 tag titled peoplefinder then a p tag with "text options" as the inner text.

What I'm wanting to do is select the proper text options inner text based on the h5 that's right before it, as text options is prevalent throughout.

<div data-v-03e70c58="" class="card-body">
    <div data-v-03e70c58="" class="card-icon"><svg data-v-03e70c58="" aria-hidden="true" focusable="false" data-prefix="fal" data-icon="chevron-right" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 256 512" class="svg-inline--fa fa-chevron-right fa-w-8"><path data-v-03e70c58="" fill="currentColor" d="" class=""></path></svg></div>
    <h5 data-v-03e70c58="" class="card-title">peoplefinder</h5>
    <p data-v-03e70c58="" class="card-text">Text Options</p>
</div>
Plamen Mitrev
Telerik team
 answered on 26 Aug 2020
3 answers
106 views

Hi, can't you improve the display of image captured on failure?

In the screenshot, as you can see, one cannot clearly distinguish texts or any other small component.

Isn't it better to enlarge image when window size is maximized or can't you add a zoom functionality?

Elena
Telerik team
 answered on 19 Aug 2020
1 answer
38 views

Every time i am trying to edit anything in m Test list followed by saving the changes i am getting "Storage service unavailable error-Invalid URI" error .Screenshot attached. 

 

Note-I am working locally and the project is my own machine and not linked to any repo.

 

 

 

Elena
Telerik team
 answered on 17 Aug 2020
3 answers
72 views

Hello I was looking for what is the best approach to append a data driven value (from local data for example) to the end of an element locator.

For example I have an element (label) which is repeated and has the html attribute <....id=row##>.  The ## value increments from row 1 <label id=row01>....<label id=row10>

I wanted to see if there's an approach when providing the element locator expression I can do something like Id=row$(rownumber)

with rownumber being the datadriven variable.

The case for this would be to evaluate a specific row by test.

I have reviewed the following article - https://docs.telerik.com/teststudio/features/elements-explorer/find-element#data-driven

but it doesn't seem to provide a solution to append the data driven

 

Elena
Telerik team
 answered on 11 Aug 2020
1 answer
195 views

I am looking into using Test Studio for testing locally stored PDF files. The following page in your documentation ( https://docs.telerik.com/teststudio/advanced-topics/coded-samples/general/open-and-read-pdf-file ) refers to a required third party .dll that is outdated.The iTextSharp library on GIT cannot be parsed in recent Visual Studio versions to produce the .dll. However, their more recent version, iText 7, can be parsed resulting in different .dll's than the one mentioned in your instruction, making it unclear for me which of these .dll's I ought to include in the project root folder and how to add them to my coded step. I don't think the previously shown...

 

using iTextSharp.text.pdf;

using iTextSharp.text.pdf.parser;

using System.IO;

 

... would work anymore, right? Would it therefore be possible to update the help page to show the recent version of this iText tool?

 

Of course I'd also appreciate anyone's help here in the forums as well! Thanks in advance!

Nikolai
Telerik team
 answered on 10 Aug 2020
15 answers
446 views

Hello,

Has anyone attempted any automation against a React JS based application?  Right now I do not have any ideal element identification.  I think the only thing that might work for now would be XPath although not ideal.  This seems to be a difficult scenario for the Selenium arena as well.  If you have any suggestions or ideas that would be great.

Thank you,

Leon

Elena
Telerik team
 answered on 23 Jul 2020
3 answers
690 views
Hello,
I'm having issue selecting from Kendo UI drop-down list. It recorded well, but when I run the test, the mouse stopped at the drop-down without selecting the value from the drop-down. It works when the value I selected is visible from the drop-down (meaning I do not have to scroll-down), but when I select the value which needs to be scrolled down from the list, it is not working. I'm trying to select project name '30' which is not visible in the drop-down (see attached screen shot). 
I'm running test in IE. The test scripts are:
1. Click 'Span'
2. Wait for '6000' msec
3. Desktop command: HoverOver on StaticProjectSelectorListboxUnorderedList
4. Wait for 3000 msec
5. KendoListBox: select item by text '30'
6. wait for '3000' msec

It failed at step 5. I'm trying to find 'simulate real click option' from the test step which may resolve the issue, but I cannot find.

Please help.
Elena
Telerik team
 answered on 20 Jul 2020
Narrow your results
Selected tags
Tags
+? more
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Top users last month
Henri
Top achievements
Rank 2
Iron
Iron
Iron
SUNIL
Top achievements
Rank 2
Iron
Iron
Iron
David
Top achievements
Rank 1
Jackson
Top achievements
Rank 1
Iron
Iron
Tim
Top achievements
Rank 3
Iron
Iron
Iron
Want to show your ninja superpower to fellow developers?
Want to show your ninja superpower to fellow developers?