有没有办法在Selenium IDE中将字符串拆分为数组

时间:2012-09-21 20:18:12

标签: selenium selenium-ide

我正在尝试拆分字符串“1 out of 20”

有没有办法将1存储在变量中,将20存储在另一个变量中?

2 个答案:

答案 0 :(得分:1)

| store | 20个中的1个文字|

| storeEval | “$ {Text}”。split(“”)[0] |第一节|

| echo | $ {firstsection} | |

[info] echo:1

| storeEval | “$ {Text}”。split(“”)[3] | lastsection |

| echo | $ {lastsection} | |

[info] echo:20

答案 1 :(得分:0)

我不是这个领域的专家,但可能这可以帮到你

Selenium split date string working example?

看起来可以通过Selenium分割字符串