I am facing issue with selecting a option from dropdown. Infact page contains two dropdown one is filter and other one is sort with same options. When i run test on filter dropdown it actually selects option from sort dropdown. I don’t know how to handle this issue. can anyone provide solution for this?
I asked for help here. If anyone is facing same issue and found solution for that , then they will sure share the solution. But not expected this rude reply.
if you think that description you give us is detailed enough, i can tell you - is not…
I’m not rude. You are!
I’m investing my time to comunity to try to help people with idea that every time i’m helping somebody to learn more and become better in QA and Katalon.
And you are wasting my time by not providing details. I was ready to help you… now, now i don’t care.
Good luck finding solution to problem you cannot properly describe.
Thank you for your time and reply!!
I wrote the article you claimed was rude. That article has received over 1600 views on this forum and in that time it has received 33 likes and has been pinned globally across the site.
You are the first person to complain about it
How would you improve it?
What is rude about it?
The fact is, in making the post you made, you are precisely the audience it is intended for. @Andrej_Podhajsky is a very knowledgeable and helpful participant on these forums but with the best will in the world, he does not have the superpowers to perceive your issue, your app, your test code across time and space to help you. That is why he responded with my article, to remind you, we are not gods, we need your help to help you.
If you know of a better way, please let us know – we are all here to learn.
I’m sorry that you felt that the response was rude, however, I believe that it was justified. Many of this community’s leaders are very knowledgeable and passionate about the tool and about test automation in general, so it can be frustrating when we receive extremely vague questions like:
To demonstrate this, I will give you a solution that has as much effort put into it as you put into asking the question in the first place:
The solution is to make sure you are picking an option from the filter dropdown instead of the sort dropdown.
Was that helpful to you? Probably not.
I am sorry for the word “rude”. It happend cause my deadline to finish work was near and was facing lot issues. I got frustrated when i received such a long message from Andrej_Podhajsky. I do undestand you guys are really helping people here and this is not my first topic here. I have created many more topics and received proper solution for that. I have been using katalon since last one year. I really appreciate your time and patience.
Here is the issue which i am facing with dropdown. My application looks something like below
and I want to pick “Number” option from search dropdown as shown in image. But when i run my test scripts sometime it picks option from search dropdown and sometime it picks option from sort dropdown.
My scripts looks like below.
Also attached object properties details.
Can anyone help me to solve this issue ?
I hope my given details are clear now:)
In your object properties, you are selecting an “li” tag, with text “Number” : I believe it matches both “li” from search Filter and sort options. You should add more properties (with xPath maybe) to match the correct object.
Another solution you should consider is to use selectOptionByValue on “VendorDropdown”.
@Antoine_Bulteau’s answer is the correct one: you need a more specific locator for the Search dropdown. If you can show us the HTML for the dropdown and its options, we can give you an xpath that will work for sure.
I tried using select option by value but i am getting below error. Can you please check this one?
Can you show us the content of this Test Object ? Did you modify anything before using Select Option by Value ?
I didn’t modify anything. Here is the test object content
SelectOptionByValue casts the element into a Select, but your test object’s tag name is span, therefore an error is thrown. Can you show us the content of the XPath section of the test object ? There may be something usable there.
yeah please find the xpath for the object
Please try the third XPath, the one using the text “Search”. Since you want to select element from the search dropdown, I think this may work.
Can you tell me how can i use this in scripts? or I should add something in test object properties itself?
There’s a textrea called Selector Editor below the XPath section of the Test Object , please copy the third XPath and paste it there. Then save the Test Object and you can use it in your script already. Oh and remove the SelectByOptionValue, just use the script you posted originally.
Tried using same but still it selects option from sort dropdown. Not from search dropdown:(