Hi,
I was wondering if it is possible to set the location that the file download handle dialog downloads to?
I am aware that I could just set the location through the browser.
The hope is that we will be able to implement a coded step to open the downloaded file from a date specific folder for each time a test list is run. Thus run the coded step against a new set of downloads without having to manually change the download location for each browser before each test.
Any help would be greatly appreciated.
Thanks
Tom
Hi,
we are currently facing an issue with the following scenario.
We use excel to test multiple logins
In a specific scenario an error message is displayed (when using a specific user), when the error message is displayed we want the test to break. I tried the logical steps but it did not work for me.
I then created my own coded step.
What it does is it has an if else statement, but as soon as the step is reached the error has not yet been thrown. So I then get the Element not found error.
I don't want an error to be thrown as this is the functionality is correct. However when the test is rerun with the new user name and password, we want it to break.
So here is my problem.
string userLogedin = Data["userName"].ToString();
try
{
bool Error = true;
Error = Pages.Page.errorMessage.IsEnabled;
if (Error == true)
{
Console.WriteLine("an error occured in the tests");
Console.ReadLine();
Log.CaptureBrowser(ActiveBrowser, "C:\\Users\\user\\Pictures\\Page"+DateTime.Now.ToString("MM_dd_yyyy_HH_mm_ffff")+".png", true);
Log.WriteLine(LogType.Error, "Login failed");
}
else
{
Element ErrorMessage = Manager.ActiveBrowser.Find.ById("ctl00_maincontent_lblHeader");
Assert.IsNull(ErrorMessage);
}
}
catch
{
}
Now using this code, it works correctly for the user who does not get the error, but when the user comes in where the error should be displayed it does not fail the test.
This part
Log.WriteLine(LogType.Error, "Login failed");
Does not seem to work.
I keep getting an error that it is trying to convert it to a exception.
So I am in a catch 22 situation.
The test that should succeed, succeeds. The test that needs to fail, succeeds.
The test that should succeed, fails. The test that needs to fail, fails.
Can you please point me into the right direction? this is rather critical, as this will be the base for check where elements are not available in certain scenario's.
Thank you in advance.
Hi there,
I hope my wording is correct here.
I want to update a certain set of rows per iteration.
In my iteration I use different accounts that all have different passwords. We have a flow we want to go through were we want to change/update the password. I want to keep the tests as dynamic as possible so when the password is typed I want to extract that value and update the Spread sheet for the next time we log in with that user.
So to give more of an idea.
Iteration 1 uses User1 with Password 1.
He goes into the application and then selects to change his password to Password 2.
I then want to update the password only for User1 as our screens are rendered for the type of account you have.
Regards
Hi ,
I would like to compare the value in a Data bind variable and decide which steps to be executed.
Example :
IF Data("DocId") is equal to or contains "abc" or "xyz" or "124" THEN
execute steps 4,5 and 6
Else
execute step 7.
Is this possible without coded step? I don't mind using coded step for the IF Else statement but then my steps 4,5,6 and 7 are regular steps and I don't want to convert them to code.
Thanks,
SHK
Coded step:
' Create an HTMLFindExpression element
Dim expr As New HTMLFindExpression("name=cat*")
' Return all elements matching HTMLFindExpression
Dim allSams As IList(Of Element) = Find.AllByExpression(expr)
For Each selectOption As Element In allSams
Log.WriteLine("Available price cats: " + selectOption.GetType.ToString())
Next
Log contents:
'13.7.2015 12:17:32' - 'Pass' : 8. CodedStep1: Select 'ByValue' option 'randomNr' on 'SelectedPriceCat'
------------------------------------------------------------
'13.7.2015 12:17:32' - Overall Result: Pass
In log I'm missing Log.WriteLine("Available price cats: " + selectOption.GetType.ToString()) text. Doesn't "Log.WriteLine" work?
BR, Jurij
Hi there,
I have a modal with a few rows of data and a check box on each row. I can't predict the order of rows, so the checkbox I want might be in different places at different times.
Can you help me figure out how to search for a text string within a row, and then select the checkbox on that row?
In the file attachment, I'd be searching for the string WV Corp.