RadComboBox Cell text in RadGridGriew - telerik-test-studio

Am Recording web Application. That is silver light application.I have a RadGridView with a column that is RadComboBox:
when am selecting item from RadComboBox item is not selecting while running.that step is failing.
Find the below code :
SilverlightApp app = ActiveBrowser.SilverlightApps()[0];
RadGridView grid = app.Find.ByAutomationId<RadGridView>("RadGridViewName");
Assert.IsNotNull(grid);
GridViewRow row = grid.Rows[2];
row.User.Click(MouseClickType.LeftDoubleClick);
Telerik.WebAii.Controls.Xaml.RadComboBox
cb=row.Find.ByType<Telerik.WebAii.Controls.Xaml.RadComboBox>();
cb.SelectItem("Football", true);
System.Threading.Thread.Sleep(1000);
But am getting out of index error. Let me know where am doing mistake....

Related

Ag-grid cell renderer doesn't update its rowIndex in real time?

I'm wondering how I can complete my cell renderer. The renderer adds a new row when clicking an icon, and removes it when clicked again. The problem is the invididual cell renderers row indexes do not change unless I hard refresh the entire grid (which then disables the state of the dropdown itself)
How can I complete this?
const insertIndex = params.rowIndex + 1;
this.eventListener = () => {
if (!this.eButton.classList.contains('open')) {
gridOptions.api.applyTransaction({add:[{step: this.dropdownValue, dropdownRow: true}], addIndex: insertIndex });
} else {
let rowData = [];
gridOptions.api.forEachNode(function (node) {
rowData.push(node);
});
let insertedRow = rowData[insertIndex];
gridOptions.api.applyTransaction({remove:[insertedRow.data]});
}
this.eButton.classList.toggle('open');
};
this.eButton.addEventListener('click', this.eventListener);
}
option 1: Hard refresh the grid, but I lose the 'open' status of the dropdown icon. How can i carry state over after a hard refresh?
option 2: Find a way that params.rowIndex is updated after applyTransaction.
Ive tried using the default rowGroup feature, however it hides all columns by default and I havent found a way to make it work the way I need.
The solution im after is a simple 'open/close' toggle for a single row underneath without affecting the other rows

Flutter webscrapping How to access a table elements

I am writing a web scrapping widget in my flutter app to extract the meanings of a Sanskrit word. I wish to know how to access the text yellow highlighted in the attached image.
This is my code.
var document = parser.parse(response.body);
var element = document.
querySelectorAll("div.gridcontainer")[0];
var data = element.querySelectorAll('tr');
var responseString1 =
document.getElementsByClassName('gridcontainer')[0]
.children[2];

CarPlay MPContentItem

I’m working on CarPlay for audio app.
this is my code
if tabIndex == 0
{
let item = MPContentItem(identifier: "Tab \(tabIndex) Item")
item.title = Myarray[indexPath.row].name
item.subtitle = Myarray[indexPath.row].desc
item.artwork = MPMediaItemArtwork(image: imageLiteral(resourceName: Myarray[indexPath.row].imageURL))
item.isPlayable = true
if #available(iOS 10.0, *)
{
item.isStreamingContent = true
}
return item
}
So, the problem is this, when I load CarPlay I have 4 items with the same name/description/image. It should be 4 items with the different name, description and image. In my case all is the same. 1 item four time. The item is random. But when I click on it goes to the NowPlaying screen and it is the right item. Labels are correct and also the picture is correct. How can I fix this, please help.
Thanks
P.S. I also tested or real device
Problem: MPContentItem(identifier: "Tab (tabIndex) Item")
In your code you have set identifier as constant text that is why it's showing all items with the same name, description and image.
You have to provide unique value of identifier for each item. Then you will get the details as you want, check attached screen shot.

How to get row values from a Rounded Rectangle List in Dashcode?

I am new to dashcode and trying to build a simple web app for iphone using it. My primary aim is to have a Rectangular List (I have used the "Rounded rectangle list"). It is a static list and has three rows. What I want is a website to open when user clicks on any of the row, and each row would have a different URL. I was able to add a Rounded rectangle list with three static rows like
The object ID is "list"
Row 1-- Label- "Gift Cards" , Value - "http://www.abcxyz.com/giftcard"
Row 2-- Label- "Toys" , Value - "http://www.abcxyz.com/toys"
Row 3-- Label- "Bikes" , Value - "http://www.abcxyz.com/bikes"
i added onclick even to call a java script function like below
function myButtonPressHandler(event)
{
var websiteURL = "http://www.abcxyz.com/giftcard";
location = websiteURL;
}
the above code opens the same URL "http://www.abcxyz.com/giftcard" when the user clicks on any of the three buttons, but what I want is to fetch the value of each child node (which would be their respective URLs) at runtime and open it using location = WebsiteURL something like below (did'nt work for me :( -
function myButtonPressHandler(event)
{
var websiteURL = document.getElementById("list").children;
var WebURL = websiteURL[???].value;
location = WebURL;
}
Any help would be appreciated.
Thanks
OK ... so figured out my own answer. The Rounded Rectangular list is actually a multidimensional array. so to get the value of each of the rows i.e. the Http URLs and open them on the browser when the rows were touched/tapped/pressed is as below.
function buttonpresshandler(event)
{
// Insert Code Here
var list = document.getElementById("list").object;
var selectedObjects = list.selectedObjects();
//Open webpage with the value of each label
location = selectedObjects[0][1];
}
Hurray!

how to change widget name at runtime in GWT

I have a label which i need to create as per the size of my record
like if there are 2 records from database , my method should check and create 2 new labels at runtime , if 10 records there should be 10 labels to be created at run time
I am able to create 10 new labels at run time but how can i name them differently
some thing like
for (int i =0;i<array.size();i++)
{
Label lbl = new Label();
}
in this way there are 10 labels and showing perfectly , but all ten have the same name i.e lbl can this name could also be change like lbl1,lbl2,lbl3...
is it possible in GWT
Thanks
The thing you want to do isn't poosible in any programming language.
The solution you are searching for is storing them inside a list and then access the labels via the index. Eg. if you want the first label you say List[0]
GWT supports such list, the easiast for you to use ist the ArrayList!
here is some more or less pseudo code:
ArrayList<Label> labelList = new ArrayList<Label>();
for (int i =0;i<array.size();i++)
{
Label lbl = new Label();
labelList.add(lbl);
}
...
//the first item has the index 0!
Label lbl1 = labelList.get(0);
..
//doing stuff with the first label
...
//getting the secont label
Label lbl2 = labelList.get(1);
...
//you get the idea right
...