[wtr-general] Re: Custom attributes within a table
You can also access data attributes directly by converting dashes into underscores: b.tr(:class = pathUserRow).data_path_user_status_id Jarmo Pertman - IT does really matter - http://itreallymatters.net On Tuesday, January 8, 2013 8:00:24 PM UTC+2, janjos wrote: you sir are a gentleman and a scholar! It worked. Thanks :) That path ID only has one instance at this point in the test, so there's no real need to make it more specific/complex. This worked just fine. On Monday, January 7, 2013 3:08:16 PM UTC-5, Dan wrote: Try something like this: b.tr(:class = pathUserRow).attribute_value data-path-user-status-id Although you'll likely need to find some better way to identify the table row. On Monday, January 7, 2013 2:19:30 PM UTC-5, janjos wrote: I'm working with this html line: tr class=pathUserRow data-path-user-status-id=219917 And my goal is to save the data-path-user-status-id value into a variable and use it elsewhere in my test. Are there any guidelines for custom attributes within a table, using firefox? Thanks! -- 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: Custom attributes within a table
you sir are a gentleman and a scholar! It worked. Thanks :) That path ID only has one instance at this point in the test, so there's no real need to make it more specific/complex. This worked just fine. On Monday, January 7, 2013 3:08:16 PM UTC-5, Dan wrote: Try something like this: b.tr(:class = pathUserRow).attribute_value data-path-user-status-id Although you'll likely need to find some better way to identify the table row. On Monday, January 7, 2013 2:19:30 PM UTC-5, janjos wrote: I'm working with this html line: tr class=pathUserRow data-path-user-status-id=219917 And my goal is to save the data-path-user-status-id value into a variable and use it elsewhere in my test. Are there any guidelines for custom attributes within a table, using firefox? Thanks! -- 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: Custom attributes within a table
Try something like this: b.tr(:class = pathUserRow).attribute_value data-path-user-status-id Although you'll likely need to find some better way to identify the table row. On Monday, January 7, 2013 2:19:30 PM UTC-5, janjos wrote: I'm working with this html line: tr class=pathUserRow data-path-user-status-id=219917 And my goal is to save the data-path-user-status-id value into a variable and use it elsewhere in my test. Are there any guidelines for custom attributes within a table, using firefox? Thanks! -- 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