Elements added on the fly

25 views
Skip to first unread message

Anshu

unread,
Jul 12, 2018, 12:09:09 AM7/12/18
to Selenium Users
Hi,

I'm testing an application which creates graphs(similar to a flowchart).

Which has a start node and an end node in the beginning.

There is a menu through which more nodes can be added on the page and can be connected to existing nodes.

My challenge is if I want to automate this application using Selenium then how do I find the element locator for the nodes added on the fly.

Can someone please tell me if this is even possible using Selenium.

Thanks!

Anshu

unread,
Jul 12, 2018, 5:38:00 AM7/12/18
to Selenium Users
Hi,

Could someone please help me. I'm unable to find answer to this over the web.

Thanks!

Brenda Granados

unread,
Jul 12, 2018, 12:12:44 PM7/12/18
to Selenium Users
One suggestion I could make is to use a loop that looks for those items of type every few seconds. For example, if you know they will be of the form li[contains (@attribute, "item")], then count the ones you have initially, and check occasionally for changes.

Venugopal Gadiparthi

unread,
Jul 12, 2018, 12:35:42 PM7/12/18
to seleniu...@googlegroups.com
Hi,
take the x,y coordinates of nodes and try with moveToElement() then moveByOffSet() methods of Actions Class.

Thanks & Best Regards,
Venugopalg,
Contact#: +91 9581075263

--
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-users+unsubscribe@googlegroups.com.
To post to this group, send email to selenium-users@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/selenium-users/f3addd2a-6883-4c98-a70c-694c9b885f2a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Venugopal Gadiparthi

unread,
Jul 12, 2018, 12:39:02 PM7/12/18
to seleniu...@googlegroups.com
Hi,
take the x,y coordinates of nodes and try with moveToElement() then moveByOffSet() methods of Actions Class.


Thanks & Best Regards,
Venugopalg,
Contact#: +91 9581075263

On Thu, Jul 12, 2018 at 12:10 AM, Anshu <poojag...@gmail.com> wrote:

--

Anshu

unread,
Jul 12, 2018, 3:15:58 PM7/12/18
to Selenium Users
Thanks for the replies Brenda and Venu,

Brenda, thanks for the pointers I'll try and use that approach

Venu, I was thinking to get the x and y co ordinates also we need to first locate that element. Please correct me if I'm wrong.

Thanks!

Reply all
Reply to author
Forward
0 new messages