TagValue exception being thrown 10.2.4

Technology specific object identification, supported applications, web technologies, and 3rd party controls.
CWhiting
Posts: 23
Joined: Thu Mar 08, 2018 9:32 pm

TagValue exception being thrown 10.2.4

Post by CWhiting » Fri Sep 23, 2022 2:10 pm

I am setting a TagValue on an input box and an exception is being thrown. This occurs in 10.2.4 but not 10.2.2
Exception: Setting attribute 'tagvalue' failed on element '{InputTag:UserName}'[email protected] at Ranorex.Core.Element.SetAttributeValue(String name, Object value) at Ranorex.Core.Element.SetAttributeValue(String name, String value)
at Ranorex.WebElement.set_TagValue(String value)
at QMSBase.QMSCodeCollection.GeneralHelper.Login(String QMSsvrIP, String browserType, String userName, String password, String& PIDstr, String ssl) in C:\Users\AdminRex\Documents\Ranorex\RanorexStudio Projects\QMSQA91\QMSQA91\QMSCodeCollection\GeneralHelper.cs:line 4560

This is the code where the exception occurs
String version = repo.QMS.LoginPage.Version.InnerText;
Report.Info(version);
repo.QMS.LoginPage.UserName.TagValue = userName;
repo.QMS.LoginPage.Password.TagValue = password;
repo.QMS.LoginPage.Submit1.Click();

I have the same project on 2 different machines. 10.2.4 and one that I reverted from 10.2.4 back to 10.2.2. The issued occurred on both of the machines when they were were 10.2.4. Now it only occurs on the remaining 10.2.4. It does not occur on the 10.2.2 system.

The attached screen capture is after the TagValue is set and the exception thrown. The TagValue is correct set but an Exception is being thrown after.
You do not have the required permissions to view the files attached to this post.

IvanF
Posts: 81
Joined: Thu Aug 11, 2022 8:55 pm

Re: TagValue exception being thrown 10.2.4

Post by IvanF » Mon Sep 26, 2022 4:09 pm

Hi, this could be due to Ranorex recognizing element attributes differently after the update. One quick workaround could be checking the attributes and adjusting them - for example, instead of tagvalue, maybe something like InnerText starts working better.

Another potential cause could be plugin settings if any changes were made (or not re-applied) after the update. You could try checking those and potentially reverting to default plugin settings on both versions to see if it happens again.

If neither of these solve the issue, please submit the direct support ticket with the same info + attachment.

CWhiting
Posts: 23
Joined: Thu Mar 08, 2018 9:32 pm

Re: TagValue exception being thrown 10.2.4

Post by CWhiting » Mon Sep 26, 2022 4:59 pm

I submitted a ticket which was acknowledged as a known issue.

I have 817 places where TagValue is used and changing those is not an option nor should it be required. PressKeys does work but is not a good approach with this many changes needed. This also slows the test down.

I tried the default plugin setting on both 10.2.4 and 10.2.2; 10.2.4 fails and 10.2.2 works.

There is another open issue dealing with executescript that I suspect is related to the underlying cause.

Thank you for your quick suggestion and ideas.

MR_66
Posts: 3
Joined: Sun Sep 25, 2022 2:08 pm

Re: TagValue exception being thrown 10.2.4

Post by MR_66 » Thu Oct 06, 2022 12:43 pm

Hi, I have the same problem.
Did you solve the problem?
thanks!

CWhiting
Posts: 23
Joined: Thu Mar 08, 2018 9:32 pm

Re: TagValue exception being thrown 10.2.4

Post by CWhiting » Thu Oct 06, 2022 2:01 pm

I reverted to 10.2.2.

MR_66
Posts: 3
Joined: Sun Sep 25, 2022 2:08 pm

Re: TagValue exception being thrown 10.2.4

Post by MR_66 » Thu Oct 06, 2022 5:04 pm

Thank you for your answer
Last edited by MR_66 on Thu Oct 06, 2022 5:29 pm, edited 1 time in total.

CWhiting
Posts: 23
Joined: Thu Mar 08, 2018 9:32 pm

Re: TagValue exception being thrown 10.2.4

Post by CWhiting » Thu Oct 06, 2022 5:12 pm

I don't understand your question.
Ranorex 10.2.2 was released June 10, 2022
Ranorex 10.2.3 was released July 10, 2022
Ranorex 10.2.4 was released July 26, 2022.

MR_66
Posts: 3
Joined: Sun Sep 25, 2022 2:08 pm

Re: TagValue exception being thrown 10.2.4

Post by MR_66 » Thu Oct 06, 2022 5:22 pm

I'm sorry, I looked at the wrong year.
I understand now.