Re: [selenium-users] Using XPath wildcards in attributes in Selenium IDE

66 views
Skip to first unread message
Message has been deleted

kadambari saran

unread,
Dec 13, 2020, 4:19:33 AM12/13/20
to seleniu...@googlegroups.com

Use descendants 


On Sun, 13 Dec 2020 at 2:47 PM, Christos Schizas <xsx...@gmail.com> wrote:

I want to use Wildcards in my attributes. For example, this is my regular XPath:

xpath=//div[@id='_exoik_requests_WAR_exoikonomov2portlet_:j_idt1368:exoikBudgetTable:${FCIndex}:bdgDapani_panel']/div[2]/ul/li[${ParNum}]

I want to replace the j_idt number with a wildcard because the number is dynamic. I'm looking for something like this:

//input[@id='activation:*:voId:1']
I've tried the following with no success in selenium IDE
xpath=//div[starts-with(@id,'_exoik_requests_WAR_exoikonomov2portlet_:') and contains(@id,':exoikBudgetTable:'):${FCIndex}:bdgDapani_panel']/div[2]/ul/li[${ParNum}]

xpath=//div[starts-with(.,'_exoik_requests_WAR_exoikonomov2portlet_:') and contains(.,':exoikBudgetTable:'):${FCIndex}:bdgDapani_panel']/div[2]/ul/li[${ParNum}]

I don't know how to solve that issue. Is my idea even possible?

--
You received this message because you are subscribed to the Google Groups "Selenium Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to selenium-user...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/1fe6e9bf-79a8-47b1-9959-4448cebdd95bn%40googlegroups.com.

Rishabh Prabhu Srivastava

unread,
Dec 13, 2020, 10:45:54 AM12/13/20
to Selenium Users
You can refer this complete tutorial: https://www.lambdatest.com/blog/complete-guide-for-using-xpath-in-selenium-with-examples/

There are many ways to do so. You can find a complete guide there.
Reply all
Reply to author
Forward
0 new messages