English 中文(简体)
是否有办法为它本身产生的任何要素提供可预测的身份证明?
原标题:Is there a way to get knockout to generate predictable IDs for any element it creates itself?

如果我能够提及Id的分子,但用 k子进行测试,就会更容易地产生许多要素。

然而,Im目前使用xpath来获取这些要素,是......。 因此,如果我能够拿到自动识别器,那将是好的。

Is there a way to do this?

最佳回答

盒子没有东西。 然而,很容易执行具有约束力的习惯,以做你要求做的事情。 你们如何使他们“有价值”,而不仅仅是独一无二,由你们来决定我的想法。

Here is a related answer that shows how to generate unique Ids.

你们可以按照你所希望的任何办法加以修改。

Hope this helps.

问题回答

暂无回答




相关问题
safariwatir: how to select anonymous button

I m using watir for safari with ruby 1.8.7 on OSX Snow leopard. I want to click a button, the only one in the page, that has neither id nor name. It only has an onckick property and the text within ...

Ruby Watir: Clicking OK on JavaScript Alerts?

Seems none of the code I ve tried has any affect. My intention is to close any and all JavaScript prompts that may come up by hitting the "OK" button. Problem is, my script has no affect on the ...

Setting up a Proxy to record Firefox requests

I m using Ruby+Watir to request pages through Firefox. I would like to record the headers and content of every http request made through the browser. Would it be possible to configure a proxy ...

Firefox: Disabling exit alert boxes?

Is it possible to completely disable the JavaScript exit alert boxes that spring up when I try to leave the page? I m running Firewatir on Ubuntu.

How to click on onbeforeunload prompt in Watir test?

I have a webpage that has an onbeforeunload script that prompts the user when they take an action that would navigate away from the current page. How do I interact with this popup using Watir? My ...

热门标签