am new to Selenium Testing Automation Tool. I have installed the selenium IDE on my Firefox browser. I jus want to test a login page with different User.id and the Password in Selenium IDE
So where and how do i mention the set of values for the user.id and the password fields.The formation of test scripts using the multiple test data must be performed..Can anyone kindly help on this?
I figured out 2 ways:
Either create n different test scripts for Login with different usname/pwd combination.
Store the data in a file.Read the file and identify the row count and apply the loop for same...for login and logout...to test various uname pwd combination.
Not sure about using Selenium IDE for this. You might have some luck implementing something that can read in your test data from a properties file or something.
My experience is limited to C# and Java Selenium bindings, but that is how we handled test execution with multiple data sets in those languages.
Related
I am trying to build an instagram bot with selenium. So far I have managed to get it work with 1 chrome window and 1 account, it auto follows, likes etc. with the given http requests on my express server. However when I try it with 2 different accounts on 2 different selenium instances or windows, the first one stops executing the function(or maybe it starts executing on the second chrome window, I dont know whats happening). So can anyone explain me if and how its possible to continue execution on multiple windows? Note: I don't want to switch between instances.
You can use the Selenium Grid to implement the scenario.
Generally, Hub & Node Structure is generally used to run parallel Tests.
https://www.guru99.com/introduction-to-selenium-grid.html
Above link will help you to get the concept of Grid.
I'm running 11 test scenarios on 3 different system all together parallely.
S1: Win7 Firefox46.0
S2: Win10 Chrome58.0
S3: Mac Safari9.0
After completion I can see the test failure in TestNG report but I can't track in which system the scenario is failed.
Is there any way so that I can track in which system or environment test failed.
How do yo execute the test cases? Do you do it in your build with CI-System, IDE?
On the selenium website https://github.com/SeleniumHQ/selenium/wiki/Grid2 is described how to surrender capabilities on the grid. You could deliver them as String variables and looking for their values in case of failing.
Maybe this could help you?
Using TestNG it can be very easy: Just put the browser name as a parameter into a data provider and print it in your stacktrace. It can be shortened like: "ch" for Chrome or "ff" for Firefox.
A control variable like can be useful for you if you decide to run a test case in another browser tommorow.
I'm trying to simulate a firefox load testing situation. I want my to test how 10 simultaneous logins would play out on my system. I already have a connected selenium grid hub and 10 open nodes.
So far, I know I can write the test case and run it 10 times which isn't what I need because it isn't automated. I also know that I can use invocation count on the test to make it run as many times as i want but this only works on the same browser node.
Does anyone have any ideas on how to automatically distribute the same test case to multiple instances of the same driver profile?
i.e. Run a login case test times on the same firefox profile open in 10 different nodes in parallel.
Gracias!
P.S. I built my tests using testNG if that matters.
Basically selenium and testNG is not for such requiurement. You should use some dedicated tool for that like jmeter.
However you can run n methods parrallel let say if you want to login with 10 dif user in 10 thread/browser you can create test data driven and configure to run method in parrallel. Make sure you are providing proper value of parrallel thread count.
How about combining threadpoolsize with invocationcount. - http://testng.org/doc/documentation-main.html#parallel-running
Grid would take care to distribute on the 10 nodes.
use headless browser like GHOST and then invoke multiple threads as ghost has no UI so it would work in your case
I'm using Selenium IDE 2.3.0 to record actions in my web application and create tests.
Before every test I have to clear all cookies, load the main page, log in with a specific user and submit the login form. These ~10 commands are fix and every test case needs them, but I don't want to record or copy them from other tests every time.
Is there a way to configure how "empty" test cases are created?
I know I could create a prepare.html file or something and prepend it to a test suite. But I need to be able to run either a single test or all tests at once, so every test case must include the commands.
Ok I finally came up with a solution that suits me. I wrote custom commands setUpTest and tearDownTest, so I only have to add those two manually to each test.
I used this post to get started:
Adding custom commands to Selenium IDE
Selenium supports object-oriented design. You should create a class that takes those commands that you are referring to and always executes those, in each of the tests that you are executing you could then make a call to that class and the supporting method and then execute it.
A great resource for doing this is here.
I have the recorded steps to create user in selenium. same user insertion does not matter. but essential is to execute single recording 10,000 times. is it possible in Selenium addons itself or do i need to write the code using Selenium API's.
You do not have to program anything. This can be done even in Selenium IDE (guess you are using it now) with recording just one case.
See these resources to help you:
How to use loops in Selenium IDE'
How to use user extension in Selenium IDE (video)
Sideflow user extension (used for while loops in IDE)