我的以下代码无法正常工作,我需要在对话框流中选择第一个可用元素

时间:2019-06-06 17:19:23

标签: typescript jasmine protractor

我需要选择对话框中的下一个可用按钮,是成功还是失败

下面是我的代码,它找不到成功元素,但不会转到else语句来检查另一个元素

first = ["item1", "item2","item3"]    
second = ["item4","item5","item6"]    

list1 = [first,second]    
list2 = ["asd","asd","asd"]    
list_of_lists = [list1,list2]    

x = input("Which list are you going to use?: ")    

for item in list_of_lists:    
    if item == x:    
        match = item    
        print(match)    
        print('There was a match')    
    else:    
        print('didnt match')    

0 个答案:

没有答案