Implementing array elements in Selenium

99封情书 提交于 2020-06-17 14:10:45

问题


Post My previous question in Printing array elements in Selenium IDE

I tried to print the array elements in text box the command is as follows:

while sending the values of vehicles to iterator so that I can further enter the values as ${KEY_ENTER}with the array elements it does not pass the value of the vehicle to the iterator.

Is there an alternate way where I can send the array values so that I can target css=.XTCLo to that array elements.

I even tried by executing

type | css=.XTCL0| ${iterator} 

But it just enters ${iterator} instead rather than value by doing so.

So tried using send keys command but it didn't work can someone help me with this?

Output

Running '1st (1)'
15:16:08
1.open on / OK
15:16:09
2.executeScript on ["car","bus"] with value vehicles OK
15:16:09
3.forEach on vehicles with value iterator OK
15:16:11
4.store on myitems with value myvar OK
15:16:11
5.click on css=.Fifk5 .\_6q-tv OK
15:16:11
6.Trying to find vehicles... Failed:
15:16:12
Implicit Wait timed out after 30000ms
Warning implicit locators are deprecated, please change the locator to id=vehicles
15:16:15
'1st (1)' ended with 1 error(s)

回答1:


I executed script | return ["car", "bus"] | vehicles, and replaced send keys | vehicles | ${iterator} with send keys | css=.XTCL0| ${iterator} this fixed the issue



来源:https://stackoverflow.com/questions/62129404/implementing-array-elements-in-selenium

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!