dynamic table values
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
dynamic table values
Hello everybody!
I would like to ask you what is the best way for coding a function in Java script for choosing (click) a value into a dynamic table?
Thank you for helping me in advance.
Best regards
lambada
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hello everybody!
I would like to ask you what is the best way for coding a function in Java script for choosing (click) a value into a dynamic table?
Thank you for helping me in advance.
Best regards
lambada
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Can you provide more details about your application and task - technology used (iOS/Android), screenshots, element properties (Object Browser data) etc?
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for answering
It is browser testing. There is a application and a table into a side. I have to choose a specific value I need and to click on it. The table is dynamic, so the cell column of the specific value I need is changing by any changes (if bytime new values are generated).
I hope that explains it better.
BR
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
So, you are speaking about web-application, right? I was confused, because this part of community is about mobile apps. Different technologies may require a different approaches.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> I hope that explains it better.
No, it does not.
Implementation depends on your tested application, conditions and your needs.
For example, if the value you are looking for is unique, then you may just search for it within entire page. Or within the given table.
If you must find the cell on the intersection of the given row and column, then you must find a way to get the required row and column and than find a way to find an object that corresponds their intersection. (In modern web applications table does not necessarily have a <Table> markup, likewise cells do not necessarily have a <TD> markup.)
If your table is long and lines that are out of view are populated only when they are scrolled into view, then you will have to search for the data within the view, scroll and search again until search success or data end.
So the more actual information and data, but not generic description that is applicable to any dynamic table, you provide, the better are chances to get a helpful piece of advice...
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
unfortunatelly I posted it twice and I didn´t find how to delete this one in the community about mobile apps, but I was happy that someone answered to my question
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Thank you for your answer.
I have a table. And there are several values. I need f.e. to click the value "name123". Every value is in the same row (here: row 1). I need a "if" funcion with a "column counter", because the script has to go to the first column and compare if the first value is "name123". If the value is "name123" it should click on it, else go to the second column in the same row. And so on till it reach the value "name123".
I hope this is now better, I am a starter.
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
> I hope this is now better
On the high level you already answered your question.
On the more lower level of actual implementation you still did not provide any information that provides at least some information about internal structure of your tested application.
You should use Object Browser, explore internal structure of the given web page and figure out how to identify and iterate through the objects that you need to analyze.
https://support.smartbear.com/testcomplete/docs/tutorials/getting-started/intro/object-model.html, https://support.smartbear.com/testcomplete/docs/app-testing/web/general/object-identification/index....
and https://support.smartbear.com/testcomplete/docs/testing-with/object-identification/index.html
help topics might help you if you are not familiar with how TestComplete interacts with the tested application.
/Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================
- Bookmark
- Subscribe
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi Alex
Thank you for your answer.
> On the high level you already answered your question.
Yes, but now I should write a script. Can you help me?
function choose value() {
var name123;
if (
...
count = count +1;
...
click.name123;
}
}
something like that.
It is browser testing (Chrome) and a table like:
name ab age ab
name00 age00
name0 age0
name1 age1
name5 age5
name cd age cd
name8 age8
...
name123 age123
name124 age124
...
name x age x
name za age za
but the table ist dynamic. So once the value "name123" is f.e. in column 17 and next time in column 28. So I cannot use page.browsername. ... .click(74, 18);
Regards,
lambada
