Stale element not found, is this relate to using same Object?

@jirayu.s

I want to find out the solution to your original problem. In order to achieve it, I need to see your problem reproduced on my PC.

Is your the URL of your UAT (Application Under Test) public to the Internet? If so, please tell us the URL.

If the URL is private and therefore impossible for others to look and see, it would be difficult to find a clear answer to your original question.

1 Like

I think that this question by @jirayu.s is valid. It deserves an answer.

However, still I do not see the reason why @jirayu.s got the error “stale element reference”.

To find out the reason of stale element reference, I need to see more detail how the Application Under Test is implemented. So I need to be able to have the AUT in action on my PC.

my gift for you:

So, perhaps, you may like to re-phrase this sentence.
This may be true with the objects generated by the Spy tool or whatever that abomination is named.
But the same can happen with xpath.
just saying …
It has been proven, in various topics, this tool creates more problems than it solves

I know CSS Object too why you are keen on replying to me?
if you really here to provide a solution provide it to the person who created the Post. instead, you are pointing to me.
the reason for the stale element is simple there are more ways to overcome it
stale element often arises for the following reasons

  1. If the object is a dynamic one that keeps on changing
  2. If you use the same element twice you can overcome this by using POM in selenium here in Katalon just copy the object rename it and use it this will fix it
  3. if the web element is no longer attached to the DOM

as you mentioned you can achieve the results by using either of them

WebElement firstName = driver.findElement(By.cssSelector("input[name='first_name']"));

or

WebElement firstName = driver.findElement(By.name("first_name"));

because you are providing fake impression to the user that xpath is the one and the only solution
which is wrong from a technical perspective
aside of that, your atitude is ‘my way and that’s all’ and whatever is not according to your own rules, you report as an offense.
which is not fair for comunity.
so, as a member of this comunity, i take your attitude as a personal offense.
(but i don’t report it)

I just gave the answer from my point of view.
I’m not here to bully someone. or argue others’ answer
I shared my solution and he provoked me with his reply and showed attitude and now you doing the same.
as a member of this community, I’m here to help and get help with my tests.
unlike you taking it as a personal offense.

2 Likes

now we are starting to talk.
first thing i will expect from your side, public apology to @Russ_Thomas
once i saw this and his post is re-instantiated like it was, russ will delete his new post and from there the discussion will happen at technical level.

once i will see the above fulfilled i will apologize to you publicly for the other chase (yes, i did that on purpose)

with the hope we can continue help this comunity in a professional maner, without the tendency to shadow some other valuable members.

on this last sentence, yeah, i may be the idiot, so if it is like this, as i mentioned, i will apologize for it.
but not yet…

I appreciate your concern

I too expect an apology from @Russ_Thomas for showing attitude.

Hi all,

Did not know all this was going down while I was away.

Now, since CSS locators/selectors and Xpath are way outta my league, I am not going to comment on which person got it right and wrong, technically-speaking.

Since this is a discussion forum, you are all free to suggest your method(s) of working, and the OPs (in this case @jirayu.s) are free to follow whichever method(s) that work best for them, and then we can call it a day.

Granted, some comments might have come off as a tiny bit strong, and thus, the receiving party might have misinterpreted what was being said and everything just snowballed from there. I am not going to ask anyone to apologize to anyone here (though I do suggest whoever involved to talk to each other via PMs, and work things out there - in a professional and friendly way please).


Since it is the weekend (in my timezone at least), let’s all take a breather, grab a beer :beers: (or a blunt :eyes:), and walk away from all this “tension” for a while.

And @jirayu.s, please let me know if any of the comments in this thread was able to answer your question, and then I will proceed to close it. Thanks.

2 Likes

thank you @albert.vu

now, it is my time to apologize @bharathi.a for chasing.

hope you understand why i did that.
details:

we are here in a comunity with members from different cultures, level of expertise and so on
due to that, it is very easy a certain topic to be interpreted as ofensive or not.
meeeh…get used to that.
i think i am the champion on this comunity in such (my posts being wrong taken)

so kinldly let us learn something from this.
the common language we have is on technical level.
thank you!

1 Like

keep being ‘smart’ and you will see the other side of me
comunity included

Don’t hold your breath. The statement I made was polite, starting with the word PLEASE.

image

Your manners on the other hand were less than exemplary. Not a single word of politeness. You sniped around in the dark and blocked my posts. THAT’s a childish attitude unbefitting adult discourse, especially in a public arena.

Don’t take technical arrogance as a personal attack. IT IS NOT PERSONAL unless YOU take it as personal.

You had a choice and you chose to take offense. Then you had another choice and you chose to enter into a long diatribe about something else entirely, nothing to do with the implied question “why”. Then you had another choice and you chose to block my posts.

I’m not responsible for your choices, even if your feelings were hurt.

@kazurayam , thanks for your effort trying to reproduce my work, unfortunately it is internal application that can’t be publicize.

@albert.vu first of all, I’m much appreciate for all comments and advices from all members that are trying to support issue. Like Albert.Vu said, it’s weekend break. Let’s grab beer and relax.

I’m trying to figure out how to resolve my issue with all comments and advice. I could feel heartful support from community members. Sorry for my poor English that may cause misleading.

1 Like

Your English is fine.

hi @albert.vu do have any moderators to take control of these situations?

1 Like

@Russ_Thomas thanks a lot,

I decided to make another copy of my test cases, it yields same error when repeated same object name #7 and #9.

Here are my test step.
  1. Open browser,

  2. Click select 'log in with Microsoft Azure,

  1. Input user account then click ‘Next’

2023-09-29_13-16-36

  1. Input user credential and then click ‘Next’ (error shown in this step).

2023-09-29_13-18-42

The 'Next' button in hold similar Object Name and locators. Object Repository for input_Sign in _idSLButton9 derived from Record Web tool.

my apologies to you if my reply hurts in any manner

2 Likes

Can you at least use the Inspect in browser and show us the html code, in both cases?
If there is some sensitive data, you can censor it but keep the html structure intact.

See this topic for guidance on how to use Developer Tools:

1 Like