Quantcast
Channel: Silk Test - Forum - Recent Threads
Viewing all 625 articles
Browse latest View live

Setting TrueLog Options Silk4Net during test

$
0
0

Is it possible to set the OPT_TRUELOG_SCREENSHOT_MODE value during a Silk4Net test with Visual Studio C#?


run same scripts on Firefox and chrome browsers respectively. using silk test classic open agent.

$
0
0

i have developed scripts on IE browser. using Silk Test Classic-Open agent(16.5 version)

i need to be run  same scripts on Firefox and chrome browsers respectively.

Please suggest/ provide me samples codes for this.

 

asset locked by myself

$
0
0

the asset is locked by myself on my machine , how can i unlock it , just giving read-only access 

Thank you in advance 

Unwanted spaces at line breaks makes string comparison to fail

$
0
0

Hi,

I have an issue with the string comparison when one of the string is of multiple lines.

Dim sExpectedData As String = "File numbers 1 to 5 of allocation (5 Files in Group)"
Dim sObjLoc As String = "/WPFWindow[@caption='ESS-MIREC']//WPFTextBlock[@automationId='FileViewDescription']"
Dim sActualData As String = _desktop.WPFTextBlock(sObjLocator).Text

The sActualData would be retrieved in the below form from the application under test:

File numbers 1 to 5 of allocation
(5 Files in Group)

I have tried to remove the unwanted spaces and breaks from this string using the below code:

sActualData = Trim(ReplacesActualData, vbLf, ""))
sActualData = Trim(ReplacesActualData, vbCrLf, ""))

When I compare now sExpectedData and sActualData, I would expect both to be same but it's not. The text is same in both but the count differs in both the strings (56 and 57 respectively).

Console.WriteLine(sExpectedData)
Console.WriteLine(sActualData )
Console.WriteLine(sExpectedData.Count)
Console.WriteLine(sActualData .Count)


OutPut:
File numbers 1 to 5 of allocation (5 Files in Group)
File numbers 1 to 5 of allocation (5 Files in Group)
56
57

Though I have replaced the blank space and line breaks, how still it differs? Is there any other possibility to remove the unwanted spaces at line breaks?

regarding creating locator paths to make the objects unique

$
0
0

Do anybody have documentation regarding creating locator paths to make the objects unique?  

Silk Visual test, I have similar object in 2 web pages, Can we differentiate both the objects with 2 different names and locator paths?

Script ran fine yesterday, now I get "The type initializer for 'Main' threw an exception."

$
0
0

Hey there!

I have a very strange problem that I am hoping you could help me with as I am at a complete loss as to why this is happening.  Please help!

I didn't make a single change to the script or to the ActiveData file, and I get this error:

"The type initializer for 'Main' threw an exception."

 

 

So, here is the script.  The part in bold/italics is the step that fails:

Imports System.Diagnostics
Imports SilkTest.Ntf.XBrowser
Imports System.IO

Public Module Main

Public _desktop As Desktop = Agent.Desktop,

applicationProcess As New Process(),
ieprocess As New Process(),
chromeprocess As New Process(),
psi As New ProcessStartInfo()

'ACTIVE DATA

Public args = New Dictionary(Of String, Object)(),
row As ActiveDataRow,
rowno As Integer,
data = Workbench.LoadActiveData("MyPri_InputFile")

 

 

 

Here is what my ActiveData looks like:

  • It is on a non local "T:" drive over the network that I have no problem accessing and all our scripts are located here
  • there are two tabs in my activedata, and the one that I want to use is properly selected as "input_values"
  • The rows are all populating the data even after I make a change properly

Need help with writing an If/Then style bit of code to handle if a security challenge appears in a new window, and if not, proceeds with rest of script.

$
0
0

Hey there,

Here is my situation with the error "'Browser' is not declared. It may be inaccessible due to its protection level" I am getting:

  • Website has a login that has an option to 'remember this computer'
  • When that aforementioned option is not selected, anytime you login with this userId, you will be met with a page that requests you to answer a security question to proceed
  • As this script could be run on a variety of desktops, some might clear caches, some might not, so we need a way:
  • To check if the 'Confirm your Identity' page has displayed
  • If so, negotiate the security answer
  • If not, then proceed with the rest of the script as if it never popped up

I dug around the internet and saw nothing about best practices using this method.  Script is very simple (line in bold italics is the problemline):

Imports System.Diagnostics
Imports SilkTest.Ntf.XBrowser
Imports System.IO

Public Module Main

Public _desktop As Desktop = Agent.Desktop,
applicationProcess As New Process(),
ieprocess As New Process(),
chromeprocess As New Process(),
psi As New ProcessStartInfo()

Public Sub Main

With _desktop.BrowserApplication()
.SetActive()
.Maximize()
With .BrowserWindow("@url='*website.com*'")

Call Exists()

End Sub

Public Sub Exists()

With _desktop.BrowserApplication()

With .BrowserWindow("@url='*website.com*'")

<steps here>

BrowserWindow.WaitForObject("//BrowserWindow[@url='https://website.com/clientportal/j_security_check']", 10000)

.DomTextField("//input[@name='securityAnswer1']").SetText("securityanswer")

.DomButton("//input[@id='continue']").DomClick

End Sub

So what do you think woul dbe the best way to handle this?

SilkTest Version 17 release note

$
0
0

Hi all,

We are reviewing the release note of SilkTest verision 17.  In the Resolved Issues section, there are two issues.

RPI 1102202 Internet Explorer 11 might become unresponsive during replay after applying the Microsoft Security Patch KB3093983

RPI 1103832 Silk Test 16.5 cannot properly record a web page on Internet Explorer 11.

 Anyone know how can I get more information for these two issues.  Example, the navigation steps on how to reproduce them.

Thank you,


activedata repetition HELP

$
0
0

Does the Repetition works if you have several visual tests to Playback as shown in the attachment. Repetition is not going to the second row. It is just entering the first row's data again and again. I am not sure what is the problem behind it. Please let me know  

Grab a Property and export to excel

$
0
0

1. I am trying to grab a text property of an object and send it to Excel spread sheet. Please let me know how do we do that in Silk Visual Test,

2. Also want to know how to write an If condition whether the Object exists or not in Silk Visual Test, Please let me know the Option

Silk Partner eats up bytes from ListViewExSilk

$
0
0
I have running test on WIN 7 Enterprise an Silktest 16 for a Win32 application working without problems. Changed to new machine with WIN 8.1 Enterprise and got a strange result running tests on a ListViewEx control. The last table entry shows shows some not latin characters. During shutdown, a crashes on partner.exe with Silktest 16.5 sometimes short pops up... ... Updated to the latest Silktest 17 Hot fix 1. It seams that the crash is gone, but I didn't get the correct result either. The expected...
...second try - my previous post has not been published.
...why??

Need help with passing variables to my File Output Step. How do I pass stored variables from one sub to another to be used to populate the results spreadsheet at the end.

$
0
0

So, I have a sample of my script.  What it does is collects and compares expected values from the spreadsheet to actual values from the website it is running against.  We make the comparison, save it to an "ae_XXXXX" variable and then FileOutput() sub will collect all the variables and write them out comma delimited to a spreadsheet that is then reviewed by managers.

How do I pass more than 20 variables into the FileOutput() sub my adding them into the parentheticals?

EX:  

Public Sub FileOutput(args, ae_policy1fullname, ae_policy1owner, ae_policy1address1, ae_policy1address2, ae_policy1phone, ae_policy1email, ae_policy1beneprimary, ae_policy1benecontingent, ae_policy1insurancepremium, ae_policy1paymentmethod, ae_policy1nextpremiumdate, ae_policy1bankname, ae_policy1payorname, ae_policy1accountnumber, ae_policy1policystatus, ae_revenuesharingtotal, ae_myrep1name, ae_myrep1rank, ae_myrep1addressphonefax, ae_myrep1email)


Imports System.Diagnostics
Imports SilkTest.Ntf.XBrowser
Imports System.IO

Public Module Main

Public _desktop As Desktop = Agent.Desktop,
applicationProcess As New Process(),
ieprocess As New Process(),
chromeprocess As New Process(),
psi As New ProcessStartInfo

Public datetimefilename As String = DateTime.Now.ToString("_MM-dd-yyyy_HHmmss"),
filename As String = "C:\Users\Public\Desktop\MyPri_OutputTest\Regr_Merge_" & datetimefilename & ".csv",
errorfilename As String = "C:\Users\Public\Desktop\MyPri_OutputTest\Regr_Merge_ErrorOutputFile_" & datetimefilename & ".txt"

'FileOutput() Variables
Public ae_policy1fullname As String,
ae_policy1owner As String,
ae_policy1address1 As String,
ae_policy1address2 As String,
ae_policy1phone As String,
ae_policy1email As String,
ae_policy1beneprimary As String,
ae_policy1benecontingent As String,
ae_policy1insurancepremium As String,
ae_policy1paymentmethod As String,
ae_policy1nextpremiumdate As String,
ae_policy1bankname As String,
ae_policy1payorname As String,
ae_policy1accountnumber As String,
ae_policy1policystatus As String,
ae_revenuesharingtotal As String,
ae_myrep1name As String,
ae_myrep1rank As String,
ae_myrep1addressphonefax As String,
ae_myrep1email As String

Public Sub Main

Dim row As ActiveDataRow
Dim datetimefilename As String = DateTime.Now.ToString("_MM-dd-yyyy_HHmmss")

With _desktop.BrowserApplication()

.SetActive()
.Maximize()
With .BrowserWindow("@url='*.com*'")

For Each row In data

Try

rowno = row.RowNumber

...

'File Output Input Variables
args("myrep1name") = data.Item(rowno).GetString("myrep1name")
args("myrep1rank") = data.Item(rowno).GetString("myrep1rank")
args("myrep1addressphonefax") = data.Item(rowno).GetString("myrep1addressphonefax")
args("myrep1email") = data.Item(rowno).GetString("myrep1email")
args("policy1fullname") = data.Item(rowno).GetString("policy1fullname")
args("policy1fullnamecount") = data.Item(rowno).GetString("policy1fullnamecount")
args("policy1owner") = data.Item(rowno).GetString("policy1owner")
args("policy1ownercount") = data.Item(rowno).GetString("policy1ownercount")
args("policy1address1") = data.Item(rowno).GetString("policy1address1")
args("policy1address1count") = data.Item(rowno).GetString("policy1address1count")
args("policy1address2") = data.Item(rowno).GetString("policy1address2")
args("policy1address2count") = data.Item(rowno).GetString("policy1address2count")
args("policy1phone") = data.Item(rowno).GetString("policy1phone")
args("policy1phonecount") = data.Item(rowno).GetString("policy1phonecount")
args("policy1email") = data.Item(rowno).GetString("policy1email")
args("policy1emailcount") = data.Item(rowno).GetString("policy1emailcount")
args("policy1beneprimary") = data.Item(rowno).GetString("policy1beneprimary")
args("policy1beneprimarycount") = data.Item(rowno).GetString("policy1beneprimarycount")
args("policy1benecontingent") = data.Item(rowno).GetString("policy1benecontingent")
args("policy1benecontingentcount") = data.Item(rowno).GetString("policy1benecontingentcount")
args("policy1insurancepremium") = data.Item(rowno).GetString("policy1insurancepremium")
args("policy1insurancepremiumcount") = data.Item(rowno).GetString("policy1insurancepremiumcount")
args("policy1paymentmethod") = data.Item(rowno).GetString("policy1paymentmethod")
args("policy1paymentmethodcount") = data.Item(rowno).GetString("policy1paymentmethodcount")
args("policy1nextpremiumdate") = data.Item(rowno).GetString("policy1nextpremiumdate")
args("policy1nextpremiumdatecount") = data.Item(rowno).GetString("policy1nextpremiumdatecount")
args("policy1bankname") = data.Item(rowno).GetString("policy1bankname")
args("policy1banknamecount") = data.Item(rowno).GetString("policy1banknamecount")
args("policy1payorname") = data.Item(rowno).GetString("policy1payorname")
args("policy1payornamecount") = data.Item(rowno).GetString("policy1payornamecount")
args("policy1accountnumber") = data.Item(rowno).GetString("policy1accountnumber")
args("policy1accountnumbercount") = data.Item(rowno).GetString("policy1accountnumbercount")
args("policy1policystatus") = data.Item(rowno).GetString("policy1policystatus")
args("policy1policystatuscount") = data.Item(rowno).GetString("policy1policystatuscount")

...

Call FileOutput(args, ae_policy1fullname, ae_policy1owner, ae_policy1address1, ae_policy1address2, ae_policy1phone, ae_policy1email, ae_policy1beneprimary, ae_policy1benecontingent, ae_policy1insurancepremium, ae_policy1paymentmethod, ae_policy1nextpremiumdate, ae_policy1bankname, ae_policy1payorname, ae_policy1accountnumber, ae_policy1policystatus, ae_revenuesharingtotal, ae_myrep1name, ae_myrep1rank, ae_myrep1addressphonefax, ae_myrep1email)

----

This is the bit that compares the actual and expected and spits out an "ae_XXXXX" variable that gets passed to FileOutput() sub:

'Rep First Name

If StrComp(.DomElement("//div[@id='main_content']/h2").GetText, args("myrep1name"), vbTextCompare) = 0 Then
ae_myrep1name = .DomElement("//div[@id='main_content']/h2").GetText & " | " & args("myrep1name") & " | P"
MsgBox (ae_myrep1name, MsgBoxStyle.MsgBoxSetForeground, "ae_myrep1name") 'Comment this in if you want the message box
Else
ae_myrep1name = .DomElement("//div[@id='main_content']/h2").GetText & " | " & args("myrep1name") & " | F"
MsgBox (ae_myrep1name, MsgBoxStyle.MsgBoxSetForeground, "ae_myrep1name") 'Comment this in if you want the message box
End If

----

This is the FileOutput() sub that collects all the "ae_XXXXX" variables and writes them out to a spreadsheet.  The problem is, how do I collect more than 20?:

Public Sub FileOutput(args, ae_policy1fullname, ae_policy1owner, ae_policy1address1, ae_policy1address2, ae_policy1phone, ae_policy1email, ae_policy1beneprimary, ae_policy1benecontingent, ae_policy1insurancepremium, ae_policy1paymentmethod, ae_policy1nextpremiumdate, ae_policy1bankname, ae_policy1payorname, ae_policy1accountnumber, ae_policy1policystatus, ae_revenuesharingtotal, ae_myrep1name) 

Dim filename As String = "C:\Users\Public\Desktop\MyPri_OutputTest\Regr_Merge_" & datetimefilename & ".csv"

Console.WriteLine("Start")
Console.WriteLine(ae_policy1fullname)
Console.WriteLine(ae_policy1owner)
Console.WriteLine(ae_policy1address1)
Console.WriteLine(ae_policy1address2)
Console.WriteLine(ae_policy1phone)
Console.WriteLine(ae_policy1email)
Console.WriteLine(ae_policy1beneprimary)
Console.WriteLine(ae_policy1benecontingent)
Console.WriteLine(ae_policy1insurancepremium)
Console.WriteLine(ae_policy1paymentmethod)
Console.WriteLine(ae_policy1nextpremiumdate)
Console.WriteLine(ae_policy1bankname)
Console.WriteLine(ae_policy1payorname)
Console.WriteLine(ae_policy1accountnumber)
Console.WriteLine(ae_policy1policystatus)
Console.WriteLine(ae_revenuesharingtotal)
Console.WriteLine(ae_myrep1name)
Console.WriteLine(ae_myrep1rank)
Console.WriteLine(ae_myrep1addressphonefax)
Console.WriteLine(ae_myrep1email)
Console.WriteLine("End")

If Not File.Exists(filename)
Using outputsw As StreamWriter = File.CreateText(filename)
outputsw.WriteLine("Test Case,First Name,Middle Name,Last Name,Policy 1 Full Name,Policy 1 Owner,Policy 1 Address 1,Policy 1 Address 2,Policy 1 Phone,Policy 1 Email,Policy 1 Beneficiaries,Policy 1 Insurance Premium,Policy 1 Payment Method,Policy 1 Next Premium Date,Policy 1 Bank Name,Policy 1 Payor Name,Policy 1 Account Number,Policy 1 Policy Status,Revenue Sharing Total,MyRep 1 Name,MyRep 1 Rank,MyRep 1 Address,MyRep 1 Email")
End Using
End If
Using outputsw As StreamWriter = File.AppendText(filename)
outputsw.WriteLine(args("testcase") & "," & args("firstname") & "," & args("midname") & "," & args("lastname") & "," & ae_policy1fullname & "," & ae_policy1owner & "," & ae_policy1address1 & "," & ae_policy1address2 & "," & ae_policy1phone & "," & ae_policy1email & "," & ae_policy1beneprimary & "," & ae_policy1benecontingent & "," & ae_policy1insurancepremium & "," & ae_policy1paymentmethod & "," & ae_policy1nextpremiumdate & "," & ae_policy1bankname & "," & ae_policy1payorname & "," & ae_policy1accountnumber & "," & ae_policy1policystatus & "," & ae_revenuesharingtotal & "," & ae_myrep1name & "," & ae_myrep1rank & "," & ae_myrep1addressphonefax & "," & ae_myrep1email)
End Using

End Sub 'FileOutput

List Object in Silk Visual Test

$
0
0

How do I select the states I want  in the list box using the Silk visual test. I cannot identify the objects in the list box. Please check the attached screenshot 

Silktest Runtime: Where are the last opened file names stored

$
0
0

I use silktest runtime to execute my scripts for regression.

I invoke runtime thru DOS prompt, Sometimes while invoking runtime i see a dialog saying "unable to open c:\xyz\abc.res".

So i want to clear the filelist before invoking runtime. Please let me know in which ini file the filelist gets stored for runtime.

Note: For ST the list is stored in partner.ini, wanna know which ini stores the information incase of runtime.

sustained Click

$
0
0

I have a question, when I click button, It  continued  so long time then do not next click, when page load over  then click , it waste time, How  can it  Click then immediately do next click


Run scripts from Silk Test Workbench without launching it

$
0
0

Hi,

I am using Silk Test Workbench for automation. So far, I executed the automation script from Silk Test Workbench.

Now, I don't want to open Silk Test and run the scripts. Rather, want to run it without opening Silk Test.

Could you please help?

interacting would wait asynchronous request;

$
0
0
 asynchronous request;  when i click  a button, it has asynchronous request and it waste long time, silktest would wait it completed then do next  click, how can i do ,not wait asynchronous request completed then  immediately do next click  

ScrollToMax - creating white space in the app

$
0
0

When i use methods like ScrollToMax/ScrollByLine, it creates white space in the app (win32). Any reason why it does so.

If i scroll manually i do not see the white space issue. It happens only if i use those silktest scroll methods.

Accessing Locator without using Index Value

$
0
0

Hi,

I am using Silk Test - Open Agent for a Desktop Application. Please help in accessing a Locator without using Index value.

Thanks in Advance!!

searching all .NET scripts within a Project in Silktest Workbench

$
0
0

I am currently using Silktest Workbench 17.0.  Is there any way to perform a search of your entire Project for specific code?  For example, let's say I created a function called getAlarms.  A bunch of time has gone by and I've written many scripts with extensive amounts of code.  Now I am working with alarms again and I know I created a function related to them.  I want to be able to search all the code in my Project for getAlarms.  Or maybe I forget the function name but I know the comment would mention "alarm" so I want to search for that.  Short of going to each .NET script individually and performing a search, is there a way to do a global search?  I don't believe that there is, but I'm hoping someone has maybe figured out a way to do this.

Thanks.

Viewing all 625 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>