I have the following specflow test that passed if i run it independently however when i run it in a suite i get the following error when i reaches the table:
OpenQA.Selenium.WebDriverException: Unexpected error. session
82486589-6a16-4b60-9503-c25a886698e7 does not exist
Here is example of the Specflow Scenario:
Scenario: New Register user
Given I Navigate to 'https://somewebsite.com/'
And Click element with link text 'Register'
And I wait for '5' seconds
When Enter the following new user details:
| Username | Password | Email | Firstname | Lastname | Time Zone |
| Bobby | password99 | some#email.com | Bob | smith | GMT ------ U.K. |
And I take a screenshot and save it as 'SmartBear new user information' in 'C:\AutomationScreenShots'
And I click 'Register' button*
Any help will be gratefully appreciated
Related
I am creating an windows software. In that I need to logoff all users except current user who is logged in.
I have tried using power shell command in my WPF application which works some time and and some time it doesn't.
find the command below:
quser | Select-String "Disc" | ForEach {logoff ($_.toString() -split ' +')[2]
When I click a button in my WPF Apllication all users except current should be loggedOff.
The code you posted will only log off disconnected users. To log off everyone except the current user you'll have to remove the current user from the quser output:
(quser | Select-Object -Skip 1) -notlike ">$env:USERNAME *"
and then log off the remaining sessions:
... | ForEach-Object { logoff ($_ -split ' +')[-5] }
Ansgars answer did not quite work for me, what worked was:
(quser) -notlike ">$env:USERNAME *" | Select-Object -Skip 1 | ForEach-Object { logoff ($_ -split ' +')[-5] }
This did the trick as I had to exclude the current user first from the quser listing.
When using the Test Runner of Microsoft Test Manager, it creates a window which is docked to the edge of the screen. This window seems to sit "outside" the desktop area so that the start menu, etc don't overlap it, and when you maxmize another app, it takes up the remainder of the screen and this docked window stays in place.
Some Ascii art to explain
Normal windows Desktop
+-------------------------------------------------+
| |
| Icon |
| Icon |
| Icon |
| |
| |
| |
+-------------------------------------------------+
| start <taskbar> 2pm |
+-------------------------------------------------+
With MTM runner
+----------+--------------------------------------+
| | |
| | Icon |
| | Icon |
| MTM | Icon |
| Runner | |
| special | |
| window | |
+ |--------------------------------------+
| | start <taskbar> 2pm |
+----------+--------------------------------------+
I'd like to do something similar to this in my application, but I can't figure out what to google for or what the terms might be. The app is a C# WPF app, but I'm happy to P/Invoke into C or C++ if neccessary.
I have such user story:
Given I am on the 'Login page'
When I enter following credentials
|Email |Pass |
|email1|pass1|
|email2|pass2|
Then I get next 'Error' messages
|ErrorMessage |
|ErrorMessage1|
|ErrorMessage2|
How can this be done?
The problem is that by my implementation, web driver is entering all the credentials from first table, and then try to assert error messages, but I need test to be run multiple times(kind of a loop).
you need to use a scenario outline:
Scenario Outline: some name...
Given I am on the 'Login page'
When I enter the email <email> and password <password>
Then I get next the error message <errorMessage>
Examples:
| email | password | errorMessage |
| email1| pass1 | ErrorMessage1|
| email2| pass2 | ErrorMessage2|
this will run the same test twice, once for each row in the Examples table. If you want the test to be run more times, just add more rows to the Examples table
As was pointed out in the comments, Examples is the defined term in gerkin, but Scenarios or Examples works fine in SpecFlow
I need to know that is it possible to call specific tab of System Configuration through c# application.
Till now I am only able to call msconfig.exe through my code i.e.
ProcessStartInfo pf = new ProcessStartInfo(
Path.Combine(Environment.SystemDirectory, "msconfig.exe"));
pf.Verb = "runas";
Process.Start(pf);
Now I want to call only Single tab to open that is StartUp at button click.
Please get me some solution.
Msconfig takes a number as argument to decide which tab to show. -4 is the StartUp Tab
ProcessStartInfo pf = new ProcessStartInfo(
Path.Combine(Environment.SystemDirectory, "msconfig.exe"));
pf.Verb = "runas";
pf.Arguments ="-4";
Process.Start(pf);
+--------------------+
| Arg | Tab |
+--------------------+
| -1 | General |
| -2 | Boot |
| -3 | Services |
| -4 | Startup |
| -5 | Tools |
+--------------------+
blog with the arguments No formal docs from microsoft seem to exist with regard to this argument. This works for me on Windows7.
We have several scheduled jobs running in our various servers. I was looking if I could do something to see all the scheduled tasks along with the last run time and the last run result.
I have looked at this CodeProject article but I couldn't find anything for the last run details.
Also, I have looked at the XML file located at
C:\Windows\System32\Tasks
Using this file I can get the jobs but not the last run details.
I would like to know how I should proceed to get the jobs along with their last run details from remote computers.
You might want to try the managed wrapper for the scheduler API: http://taskscheduler.codeplex.com/
Project is migrated to https://github.com/dahall/taskscheduler
From this 2015 blog post, you can get this data running this PowerShell command:
Get-ScheduledTask | where state -EQ 'ready' | Get-ScheduledTaskInfo | Export-Csv -NoTypeInformation -Path C:\scheduledTasksResults.csv
The result will be on a CSV file, which you can open with Excel and export it as the bellow table:
LastRunTime | LastTaskResult | NextRunTime | ...
21-12-17 20:24 | 0 | 0 | ...
15-05-18 | 12:55 | 0 | ...
14-05-18 19:13 | 0 | 0 | ...
14-05-18 | 19:14 | 0 | ...
30-11-99 01:00 | 267011 | 0 | ...
15-05-18 12:25 | 0 | 16-05-18 | ...
14-05-18 19:13 | 2147500037 | 0 | ...
15-05-18 | 14:15 | 0 | ...
14-05-18 | 19:15 | 0 | ...
15-05-18 | 12:25 | 0 | ...
__
Related with:
Get last run date of task in Windows Scheduled Tasks from ASP.NET