Reputation
1,130
Next privilege 1,250 Rep.
Create tag synonyms
Badges
5 24
Newest
 Revival
Impact
~40k people reached

Apr
11
revised How to pass two strings (Username and Password) one by one in the two different text fields (Username and Password) in webdriver (Java)
Added an alternative solution.
Apr
11
comment How to pass two strings (Username and Password) one by one in the two different text fields (Username and Password) in webdriver (Java)
I added an alternative solution to outline what I was thinking with regards to the list.
Apr
11
comment How to pass two strings (Username and Password) one by one in the two different text fields (Username and Password) in webdriver (Java)
You were on the right track. The main problem you had is you were executing a loop inside of another loop. so they name and passwords got associated more than once.
Apr
11
comment How to pass two strings (Username and Password) one by one in the two different text fields (Username and Password) in webdriver (Java)
Since the arrays are the same size in this case I am only using it to define the upper bounds of the loop. So I could have used password.length but it is pretty much interchangeable. There are two other possible approaches you could take. One would have been to use a Map (key/value pairs). Or you could have created a custom object to hold the values and stored those in a List<>.
Apr
11
revised How to pass two strings (Username and Password) one by one in the two different text fields (Username and Password) in webdriver (Java)
changed solutions based on comment, editing indentions
Apr
11
comment How to pass two strings (Username and Password) one by one in the two different text fields (Username and Password) in webdriver (Java)
Ok - based on your comment is sounds like you need to modify your looping structure. I am assuming the order of the usernames and passwords line up so index 0 and 1 in both arrays? Working from that I will modify my answer.
Apr
11
answered How to pass two strings (Username and Password) one by one in the two different text fields (Username and Password) in webdriver (Java)
Apr
11
comment Selenium 2.40 driver select tag issue
are you getting any exceptions or other errors? Where is it failing at?
Apr
9
reviewed Close Why do you think compliance test is important?
Apr
9
reviewed No Action Needed Changing course from Pre-Med to SQA engineering…what should I do?
Apr
9
reviewed Reviewed UI Automation Checking between two applications
Apr
9
revised UI Automation Checking between two applications
Cleaned up formatting an text a bit.
Apr
9
reviewed Leave Closed Should your QA Automated tests reside with application code?
Apr
9
reviewed Reject Criteria for deciding what is more important to test
Apr
7
reviewed Close Should your QA Automated tests reside with application code?
Apr
7
reviewed Approve Should your QA Automated tests reside with application code?
Apr
5
reviewed Reviewed Compare screenshots of rendered web pages
Apr
5
reviewed Reviewed Data generation for QA tests
Apr
5
reviewed No Action Needed How do you fit regression into Kanban?
Apr
5
reviewed Reviewed Required Selenium Test Cases for Yahoo Login Form