1) send_keys isn't going to work with two things trying to send_keys
simultaneously.
2) send_keys is almost never a good solution, in my experience, doing
through the dom via watir's api is better.
3) your xpath refers to an image with class
of CreateRequestComboContainerRightImageCell but the thing that has that
class is a table.
4) you don't really need xpath for this, watir's api is simpler:
b.table(:class, 'CreateRequestComboContainerRightImageCell') will get the
table and you can get the image inside that.

On Tue, Oct 5, 2010 at 07:10, Taki Sama <timothy...@gmail.com> wrote:

> Hi All,
>
> Im new to Watir, coming from a QTP background.
> I'm using the following Ruby 1.8.7, Rubygems 1.3.6, Watir 1.6.6 on a
> Windows 7 X64 system.
>
> I happen to need to run multiple 'modules' at the same time on 1 box.
> Would it be possible to implement a separate instance of 'send_keys'
> per each run? If the 'modules' happen to use 'sendkeys' at the same
> time, the whole script gets messed up (focus, typing and sending on
> the wrong browser).
>
> I was also looking at XPATH to avoid using sendkeys (trying to click
> actual objects); but I am stumped with the syntax to get it working..
> please help?
> Like with and without regex methods please.
>
> b.element_by_xpath("//
> i...@class='CreateRequestComboContainerRightImageCell']/").click
> b.image(:xpath, "//
> i...@class='CreateRequestComboContainerRightImageCell']/").click
> None of them seem to get the desired result; (I'm assuming this for
> instances that I wont be able to get a unique id or name)
>
> Here is a sample structure:
>
> <td class="CreateRequestComboContainerRightImageCell"
>
> id="Master_PageContentPlaceHolder_screen_ctl01_bc8ee8e9_1efe_463b_9e46_780e216598f1_screen_jobTitleCombo_ContainerRightImageCell"
> jQuery1286272679885="60">
> <img class="CreateRequestComboRightImage"
>
> id="Master_PageContentPlaceHolder_screen_ctl01_bc8ee8e9_1efe_463b_9e46_780e216598f1_screen_jobTitleCombo_RightImage"
> src="/XXX/Theme/AttachmentHandler.ashx?
> Parameter=Theme.ControlImages.XComboSelectorDropDown"
> complete="complete"/>
>
> --
> 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

Reply via email to