[wtr-general] Re: Click on links on a dynamic pane
Credit goes to Bret and Brian for choosing Ruby as the language when they first set about to create watir.. However the .parent method is purely a Watir thing, I don't know who came up with the idea of doing that, but it's a GREAT addition to Watir. and just call me Chuck ('van der Linden' is rather a lot to type, and most of us go by our first-names anyway, not our family names) On Mar 18, 3:35 am, Aravind aravindredd...@gmail.com wrote: Woow Linden Its working fine. Surprised to see that. Thank you very much for your help. Till now i heard about ruby and now i am realising how easy it is. below is the code I used. for i in 3..table.row_count - 1 if table[i][8].text == APV table[i][1].link(:index,1).click table[i][1].link(:index,1).parent.link(:text,Open This Version).click i = table.row_count end end thanks aravind On Thu, Mar 17, 2011 at 11:00 PM, Chuck van der Linden sqa...@gmail.comwrote: Can you show me the code for the click? from the looks of the dom, the original link you click to see the sub- menu, and those menu items, are all 'inside' that table row. I suspect that the challeng is that there are other similar hidden links (at that point) on each of the other table rows, all with the same link text etc.. Making clicking the right one a challenge; So you might be able to identify them according to a sibling relationship with the link you clicked Try using the same code as for the click, but replace the .click with the following .parent.link(:text, Open This Version).click as Basim indicated, you may have to FIRST fire an onmouseover event against that element, since I see code in there that is reacting to that event, and perhaps if it does not see that first, you won't be able to click it On Mar 17, 8:25 am, Aravind aravindredd...@gmail.com wrote: Basim I used Click method thanks aravind On Thu, Mar 17, 2011 at 8:51 PM, Basim Baassiri ba...@baassiri.ca wrote: When you say click on the action, do you use click method or do you use fire_event ? On Thu, Mar 17, 2011 at 11:13 AM, Aravind aravindredd...@gmail.com wrote: Hi This is the continuation of my previous question which is resolved. I have some links with the name action in the1st column of all the rows in a table. When I click the action link a dynamic pane will be displayed with few more links. Now i have click on any of the links on the pane. The image of the page and the html is attached. Please help. thanks aravind -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
Re: [wtr-general] Re: Click on links on a dynamic pane
Woow Linden Its working fine. Surprised to see that. Thank you very much for your help. Till now i heard about ruby and now i am realising how easy it is. below is the code I used. for i in 3..table.row_count - 1 if table[i][8].text == APV table[i][1].link(:index,1).click table[i][1].link(:index,1).parent.link(:text,Open This Version).click i = table.row_count end end thanks aravind On Thu, Mar 17, 2011 at 11:00 PM, Chuck van der Linden sqa...@gmail.comwrote: Can you show me the code for the click? from the looks of the dom, the original link you click to see the sub- menu, and those menu items, are all 'inside' that table row. I suspect that the challeng is that there are other similar hidden links (at that point) on each of the other table rows, all with the same link text etc.. Making clicking the right one a challenge; So you might be able to identify them according to a sibling relationship with the link you clicked Try using the same code as for the click, but replace the .click with the following .parent.link(:text, Open This Version).click as Basim indicated, you may have to FIRST fire an onmouseover event against that element, since I see code in there that is reacting to that event, and perhaps if it does not see that first, you won't be able to click it On Mar 17, 8:25 am, Aravind aravindredd...@gmail.com wrote: Basim I used Click method thanks aravind On Thu, Mar 17, 2011 at 8:51 PM, Basim Baassiri ba...@baassiri.ca wrote: When you say click on the action, do you use click method or do you use fire_event ? On Thu, Mar 17, 2011 at 11:13 AM, Aravind aravindredd...@gmail.com wrote: Hi This is the continuation of my previous question which is resolved. I have some links with the name action in the1st column of all the rows in a table. When I click the action link a dynamic pane will be displayed with few more links. Now i have click on any of the links on the pane. The image of the page and the html is attached. Please help. thanks aravind -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com
[wtr-general] Re: Click on links on a dynamic pane
Can you show me the code for the click? from the looks of the dom, the original link you click to see the sub- menu, and those menu items, are all 'inside' that table row. I suspect that the challeng is that there are other similar hidden links (at that point) on each of the other table rows, all with the same link text etc.. Making clicking the right one a challenge; So you might be able to identify them according to a sibling relationship with the link you clicked Try using the same code as for the click, but replace the .click with the following .parent.link(:text, Open This Version).click as Basim indicated, you may have to FIRST fire an onmouseover event against that element, since I see code in there that is reacting to that event, and perhaps if it does not see that first, you won't be able to click it On Mar 17, 8:25 am, Aravind aravindredd...@gmail.com wrote: Basim I used Click method thanks aravind On Thu, Mar 17, 2011 at 8:51 PM, Basim Baassiri ba...@baassiri.ca wrote: When you say click on the action, do you use click method or do you use fire_event ? On Thu, Mar 17, 2011 at 11:13 AM, Aravind aravindredd...@gmail.comwrote: Hi This is the continuation of my previous question which is resolved. I have some links with the name action in the1st column of all the rows in a table. When I click the action link a dynamic pane will be displayed with few more links. Now i have click on any of the links on the pane. The image of the page and the html is attached. Please help. thanks aravind -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please readhttp://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com -- Before posting, please read http://watir.com/support. In short: search before you ask, be nice. watir-general@googlegroups.com http://groups.google.com/group/watir-general watir-general+unsubscr...@googlegroups.com