Selenium:Perl: Search and Update Using Multiple IDs

20 views
Skip to first unread message

C. Opp

unread,
Aug 11, 2014, 12:31:17 PM8/11/14
to seleniu...@googlegroups.com

Hi,

I have a user interface that has three ID fields. 

Let's call them

ID A
ID B
ID C 


I need to search on ID A in a search field, and add or make updates to IDs B and C, which currently might be empty or have some other value in the field. IDs B and C are the same values. When I search ID A it must be correctly synced up with IDs B and C. For the code I was thinking all I really need is ID A and ID B. 

What's the best way to do this? I have a total of 1,000 IDs that I have to update. Would I create two lists? I'm kinda new to programming, and could use some insight. 

The data is currently in an Excel file. 


ID A ID B ID C
1 2 2
2 4 4
3 6 6
4 8 8
5 10 10
6 12 12
7 14 14
8 16 16
9 18 18
10 20 20



I already have some code that I'm going to use from a previous project that would look up ID A. Now I just need the piece where it makes the update for IDs B and C.

Thanks for the help,

C.






C. Opp

unread,
Aug 13, 2014, 5:04:20 PM8/13/14
to seleniu...@googlegroups.com

So I think what I need to do is something like this...

use strict;
use warnings;


my @ids = ('123', '456', '789');
my @ids1 = ('abc123', 'def456', 'ghi789');

# Now loop through array

my $id = each_array(@ids, @ids1);

for my $id (@ids, @ids1) {
Reply all
Reply to author
Forward
0 new messages