How to use verifyEqual

hello,my script two Test Object are equal,why the result is return “is not equal” ?



Hi @25093419

TestObject is more than just its properties. When you’re using verifyEqual you’re essentially calling the equals method of the TestObject which also compares other properties which are different between two objects. If you need to verify if two TestObjects please use getPropeties on the TestObject and compare the returned results instead.

oh ~ thank you very much, but how to use getPropeties:哭泣:
my script :
Mobile.verifyEqual(getProperties(findTestObject(‘forum tab/topic list_title’)), getProperties(findTestObject(‘forum tab/posting page/post_title_item_txt_edited’)))

%E4%BC%81%E4%B8%9A%E5%BE%AE%E4%BF%A1%E6%88%AA%E5%9B%BE_20191016184210

It looks like you’re interested in a text value… Perhaps try GetText. Output is a variable (you name it). Then verify that output (variable) and expected text are same.
If the value is within the xpath (is not visible text value eg a color etc) then use another Get method

thank you very much, I think I’ve solved it

thank you very much,I’ve got it

thank you ~ I’ve solved it