Telerik Forums
Test Studio Forum
4 answers
75 views

Hi

I receive the error "System.NullReferenceException: Object reference not set to an instance of an object." on a coded step that logs a user out of web application in step 5, and then waits until the "thank you" text is displayed on the subsequent page until continuing with the script. The error is thrown on line 8. I construct the ThankYouSignOut object in line 7 almost exactly the same as the SignOutLink in step 2, so I'm at a loss as to why it's passing on step 2-5, but failing on 8. Any help would be appreciated!

 

1.ActiveBrowser.Window.SetFocus
2.Dim SignOutLink AS HtmlAnchor = ActiveBrowser.Find.ByExpression(Of HtmlAnchor)(new HtmlFindExpression("tagname=a", "href=~logout"))
3.SignOutLink.Wait.ForExists(30000)
4.SignOutLink.ScrollToVisible(ArtOfTest.WebAii.Core.ScrollToVisibleType.ElementTopAtWindowTop)
5.SignOutLink.MouseClick
6.ActiveBrowser.Window.SetFocus
7.Dim ThankYouSignOut AS HtmlControl = ActiveBrowser.Find.ByExpression(Of HtmlControl)(new HtmlFindExpression("tagname=p","TextContent=^Thank you for using"))
8.ThankYouSignOut.Wait.ForExists(30000)

 

Daniel Djambov
Telerik team
 answered on 01 Nov 2018
1 answer
68 views

Hi,

I have some questions related to Mobile app automation in telerik test studio:

1. How can you access the code behind the automatically created test steps?

2. how can I add a xpath to an element? i basically want to identify the element using xpath.  It seems that I can access the element properties(query builder), and there is a "+" to add new properties. How can i generate a xpath automatically? 

3. How can I reuse the elements in my previous test case? Currently, It seems that it creating a the same element again and again in every test case. please look in to the attached pic. This is a really big issue because in case if the developer changes the element information, I will have to go in to each test cases and update it. 

4.How can I reuse test cases?

 

 

Elena
Telerik team
 answered on 24 Oct 2018
1 answer
120 views

I have added a coded step to one of my tests and on trying to execute it, it throws some compiler error. (attached).

If anyone can help me out with resolving these error please.

Elena
Telerik team
 answered on 23 Oct 2018
5 answers
711 views
Hi

I need to verify that the drop-down list(combobox) contains specific text.
I have no idea how to do it using the regular verification tools.

Is it possible at all, and if yes - how?

Thanks a lot in advance
Helen
Elena
Telerik team
 answered on 23 Oct 2018
3 answers
82 views

Hi,

    I am facing issue while recording scripts , when i start recording and type anything it's taking time to type and to record the steps in chrome browser.

Can you suggest me how to solve this issue?

 

Thanks 

Vimala Padakanti

Elena
Telerik team
 answered on 19 Oct 2018
13 answers
222 views

Yesterday I was able to bind a excel table to a test but now I'm not able to do that anymore since I can not select the table. See the attached screenshot for that.

This probably happened due to the update of Microsoft Office yesterday since I did not do anything else in between. I just started Telerik and couldn't change the table anymore.

 

Elena
Telerik team
 answered on 18 Oct 2018
1 answer
98 views

Hi,

Got an element to click on, element located inside iframe , click confirm action and close iframe

Recorded action:

 

Click performed successful , iframe closed but click step fails with error:

System.TimeoutException: Wait for condition has timed out

 

Coded step :

Browser myFrame = ActiveBrowser.Frames["sb-player"]

Element xpath = myFrame.Find.ByXPath("//input[@id='submitRFPProcurementButton']");

 myFrame.Actions.Click(xpath);

Same behavior, log output :

'10/16/2018 8:50:20 PM' - 'Fail' : 44. Click 'MapProperty'
------------------------------------------------------------
Failure Information: 
~~~~~~~~~~~~~~~
Exception thrown executing coded step: 'Click 'MapProperty''.
InnerException:
System.TimeoutException: Wait for condition has timed out
   at ArtOfTest.Common.WaitSync.CheckResult(WaitSync wait, String extraExceptionInfo, Object target)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout, WaitResultType errorResultType)
   at ArtOfTest.Common.WaitSync.For[T](Predicate`1 predicate, T target, Boolean invertCondition, Int32 timeout)
   at ArtOfTest.WebAii.Core.Browser.WaitUntilReady()
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request, Boolean performDomRefresh, Boolean waitUntilReady)
   at ArtOfTest.WebAii.Core.Browser.ExecuteCommand(BrowserCommand request)
   at ArtOfTest.WebAii.Core.Actions.Click(Element targetElement)
   at teststudio.RFP_Creation.RFP_Creation_CodedStep1() in c:\Users\Oleg\Documents\C360-Main-WebApp\e2e_tests_ts\tests\Global Regression Suite\
------------------------------------------------------------
 

Nikolai
Telerik team
 answered on 16 Oct 2018
3 answers
100 views

Hello,

 My test scripts are running successfully in chrome browser but same scripts are failing in edge browser.

         when run the scripts in edge able to login fine but it's failing at top menu buttons. actually in the log it is showing as Clicked on 'InvoiceSpan' but form is not opening.click event happening on the just above to the button.

 Please find the logs attachment.

 

Thanks,

Pranavi

Konstantin Adamu
Telerik team
 answered on 15 Oct 2018
10 answers
278 views
Our app has many objects that change ID based on user or sometimes session.
One of these is a Submit button:
ctl00_ctl00_mastercontent_ContentPlaceHolder1_MainTemplate1_RadDock3664_C_3664_btnnewresource_input
The numbers that typically get changed are "3664".

In the Elements list I right clicked and selected Edit Element. 
Find Element is opened after selecting to locate element without connecting.
In the ID row I changed "is exactly" to "matches this regular expression"

? - Should I just replace "3664" with "*" to except multiple characters within the string like this:
ctl00_ctl00_mastercontent_ContentPlaceHolder1_MainTemplate1_RadDock3664_C_3664_btnnewresource_input
ctl00_ctl00_mastercontent_ContentPlaceHolder1_MainTemplate1_RadDock*_C_*_btnnewresource_input
Can the "?" be used in a string to accept 1 character?  Do I need to insert the wildcards in brackets?

Find Expressions were also listed in the documentation but their use is a little unclear.

Thanks,
Chris
Elena
Telerik team
 answered on 15 Oct 2018
1 answer
190 views

Hi!

 

I'm new to Test Studio and C#, but I have experience with Codeception and other Webdriver based frameworks (Python based).

I already learned how to write coded steps and use custom cs files. What I cannot crack, is if I can use any NuGet packages from NuGet repo with Test Studio.

Can you provide some `hello world` configuration for dummies? My goal is to have helper files, that may be reused by Coded Steps. I use VS 2017 community edition.

 

Best Regards,

J.

Missing User
 answered on 12 Oct 2018
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?