1

Is there anyway of marking several different rows in a scrollable data table ?

I know how to mark one row b.div(:id, "listProductsForm:productList:bc_4_0").click

I just want to simulate the "Ctrl"- button is pressed down

SpeedyNinja
  • 371
  • 3
  • 14

2 Answers2

0

How does your "scrollable data table" looks like? Show us the HTML. I see that you are using div tag to access one element.

You probably need to fire some JavaScript event. See How to find out which JavaScript events fired?

Community
  • 1
  • 1
Željko Filipin
  • 56,372
  • 28
  • 94
  • 125
0

The chances are good that you will need to use a combination of Watir::IE.send_keys() and the click actions on the document.

Try something like this:

@browser.send_keys("{CTRLDOWN}")
@browser.div(:id, "listProductsForm:productList:bc_4_0").click
@browser.div(:id, "listProductsForm:productList:bc_5_0").click
@browser.send_keys("{CTRLUP}")

Watir API documentation: http://wtr.rubyforge.org/rdoc/1.6.5/classes/Watir/IE.html#M000497

The documentation above links to the specific key commands that can be sent. I'm pretty sure this will require that you have AutoIt installed.

JEH
  • 156
  • 5