Select tick box in table 4 per row

Ask general questions here.
cs97jjm3
Posts: 19
Joined: Mon Jan 14, 2019 4:30 pm

Select tick box in table 4 per row

Post by cs97jjm3 » Tue Dec 03, 2019 9:48 am

Hello I have several tables in HTML that hold permission options

View Modify Create Delete

I can use a csv to select tick boxes on rest of website but it is not working for these tables... I have attached snapshot of problem i have also included csv and screen shoot...


Please not i am not a coder :-)
Attachments
permissions.csv
(11.74 KiB) Downloaded 2 times
Annotation 2019-12-03 084449.png
Annotation 2019-12-03 084449.png (23.97 KiB) Viewed 51 times
select from table.rxsnp
(127.04 KiB) Downloaded 3 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Select tick box in table 4 per row

Post by odklizec » Tue Dec 03, 2019 10:08 am

Hi,

How did you create the CSV file? It seems that the format is changed for given table items?
CSVContentFormat_sm.png
CSVContentFormat_sm.png (509.13 KiB) Viewed 49 times
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

cs97jjm3
Posts: 19
Joined: Mon Jan 14, 2019 4:30 pm

Re: Select tick box in table 4 per row

Post by cs97jjm3 » Tue Dec 03, 2019 10:21 am

whoops wrong file...... that was one of my tests trying to change things sorry
Attachments
permissions.csv
(7.16 KiB) Downloaded 2 times

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Select tick box in table 4 per row

Post by odklizec » Tue Dec 03, 2019 10:28 am

OK. Now the table in snapshot you posted, shows items from 'Area' to 'GDPR'. But the csv contains much more rows? Does this means that the table is dynamically loaded while scrolling? Or the CSV simply contains items also for other tables?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

cs97jjm3
Posts: 19
Joined: Mon Jan 14, 2019 4:30 pm

Re: Select tick box in table 4 per row

Post by cs97jjm3 » Tue Dec 03, 2019 10:41 am

it is holding everything for all the other tables: that are based on the drop-down at top of the page.
Capture.PNG
Capture.PNG (16.33 KiB) Viewed 45 times
currently, I have them all together but happy to split them

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Select tick box in table 4 per row

Post by odklizec » Wed Dec 04, 2019 9:35 am

Hi,

I think the goal is relative simple and does not even need user code. See the attached sample project.
TableChecks.zip
(19.11 KiB) Downloaded 1 time
Basically, you must create a data connector from the csv file you posted. You don't even have to split it, just set the correct range.
DataConnectorRange.png
DataConnectorRange.png (66.63 KiB) Viewed 30 times
Then you must create a recording, with 5 variables, connected to data connector (accessRights, view, modify, create and delete). And also repository elements, which points to appropriate row (found via accessRights variable) and associated view, modify, create and delete celss, using following-sibling relationship operator...
FollowingSibling.png
FollowingSibling.png (39.59 KiB) Viewed 30 times
And of source, SetValue action, which should set the Checked attribute state to the one from data connector. As long as there is no "onmouse" event associated with each check, the SetValue action should happily set the appropriate value. Otherwise, you will have to use a Mouse Click action and a small piece of code, which would convert True/False strings from data connector to mouse clicks.

The attached sample should then go through the data connector rows (one by one), find correct row and from it go to the associated cell with checkboxes and set the Checked value, obtained from data connector.

Hope this helps?
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration

cs97jjm3
Posts: 19
Joined: Mon Jan 14, 2019 4:30 pm

Re: Select tick box in table 4 per row

Post by cs97jjm3 » Thu Dec 05, 2019 2:21 pm

Wow thanks i understand this that: just run a quick test with data and it is ignoring if false: if i make blank everything works... Thank You for detailed help

User avatar
odklizec
Ranorex Guru
Ranorex Guru
Posts: 5360
Joined: Mon Aug 13, 2012 9:54 am
Location: Zilina, Slovakia

Re: Select tick box in table 4 per row

Post by odklizec » Thu Dec 05, 2019 2:29 pm

Hi,

This should not happen. Unfortunately, without seeing your app, and exact implementation of test, it's impossible to tell what's wrong? Hence, I would suggest to recheck your test and if you feel that everything is OK, ask for help Ranorex support (via support form). They may eventually check what's wrong via remote session.
Pavel Kudrys
Ranorex explorer at Descartes Systems

Please add these details to your questions:
  • Ranorex Snapshot. Learn how to create one >here<
  • Ranorex xPath of problematic element(s)
  • Ranorex version
  • OS version
  • HW configuration