I want to compare two string values and check that if they are alphabetically arranged like - Moore and Kerr.
Not sure I understand. So are you trying to verify that the string appears in the format “<Name 1> and <Name 2>” (where anything in angle brackets is a variable)?
There is a list of i.e ‘County’ and I have to sort the list and check if the sorting is done properly.
I am comparing first item of the list with last item and checking if firstitem > lastitem the result is pass.
I am not sure how to do that with Alphabets
@somya.sijaria Can you Show us an Example , What is the Input and What is the Expected Output?
If checking the two strings to check only they are arranged by alpha manner. Are we doing anything after chaecking this ?
You can easily arrange it by
Between Can you explain your requirement please ?
open paranthesis to quteos to be answer
Please refer attached screenshot-
I have to automate to check if the sorting is working properly.
What I am doing for Integer type columns-
- Clicking on upside arrow
- Scrapping the data
- Comparing the firstitem and second item
- Passing the case if first value > last value.
But here I am stuck to check the sorting for alphabets.
Sorry * Comparing first and last item
- After Clicking the value. Get both first and last data and store it in array or list .
- Sort it by Array.Sort(arr) and then find the index of first data
Array.IndexOf(array_name, “array element to search”).tostring
If the index is 0, It is alphabetically ordered else it is not
Hope it works and helps for you
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.