18 January 2026:
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
This forum is now archived and is in read-only mode. Please continue discussions on our improved new Sahi Pro Community forum.
Sahi Pro is an enterprise grade test automation platform which can automate web, mobile, API, windows and java based applications and SAP.
Is it possible to use _setvalue() on a paragraph tag that does not have an id?
I'm trying to set a paragraph's text value, however the paragraph does not have an id or name. Also, it is located inside a <body> tag that has an id. For example:
<body id="tinymce" class="mceContentBody " spellcheck="false" dir="ltr"><p><br _mce_bogus="1"></p></body>
Sahi seems to require an id for each element to be manipulated. Is there an alternative way to do this?
<body id="tinymce" class="mceContentBody " spellcheck="false" dir="ltr"><p><br _mce_bogus="1"></p></body>
Sahi seems to require an id for each element to be manipulated. Is there an alternative way to do this?
Best Answer
-
SAHI doesn't depend on ID alone for object identification. There are plenty of other ways to uniquely identify an object in the webpage.
In your case as there is no id or name or any other such tags, try Xpath for identification.
//body[@id=`tinymce`]/p should identify the paragraph.