I created a combined keyword in GoTest to run a bit of script to extract the index of a component on a web page. I want to use that as a locator in my Selenium test. GoTest is a wrapper UI around RobotFramework.

I tried to create a global variable and put the value in that global variable, but it doesn't seem to work. The variable is empty when I try to use it.

推荐答案

You can place the result calculated by your combined keyword script into a variable and then put that variable in the return field of the combined keyword.

Example of the result:

image exemple of the result

Python相关问答推荐

用SymPy在Python中求解指数函数

如何在FastAPI中替换Pydantic的constr,以便在BaseModel之外使用?'

有没有办法在不先将文件写入内存的情况下做到这一点?

如何使用加速广播主进程张量?

pytest、xdist和共享生成的文件依赖项

PYTHON中的selenium不会打开 chromium URL

具有不匹配列的2D到3D广播

如何在networkx图中提取和绘制直接邻居(以及邻居的邻居)?

如何使用count()获取特定日期之间的项目

设计添加和搜索词的数据 struct :Leetcode211

从pandas框架中删除重复的子框架

Select 满足特定条件的连续元素作为单独的数组

抽象工厂模式与委托者模式组合时出现递归错误

如何 Select 包含一定字符串和数字的单元格?

FASK集合变量未更新(HTML)中的值

基于反向特征 Select 的SCRICKIT-LINE和PCA特征 Select

在所有任务完成之前完成Python事件循环

为什么一些地块有网格线,而另一些地块没有网格线?

偏移量是否有默认值?

用于模型创建的TensorFlow子类化中层的可重用性