Quantcast
Channel: Silk Test - Forum - Recent Threads
Viewing all articles
Browse latest Browse all 625

Get xpath for word dialog window description

$
0
0

Hi All,

We have this window description in the INC file for Microsoft Word dialog box.

[-] window MainWin TESTDocxMicrosoftWord
 [ ] locator "/MainWin[@caption='Test Doc']"
 [-] DialogBox ServerEditInstructions
  [ ] locator "Server Edit Instructions"
  [-] PushButton OK

If we execute the below statement in my SilkTest Classic script, the object is not able to recognize. 

TESTDocxMicrosoftWord.ServerEditInstructions.OK.Click()

We change the statement to use xpath as below, and it works.

Desktop.Find("//DialogBox[@caption='Server Edit Instructions']//PushButton[@caption='OK']").Click()

We are wondering if there is a way to convert the window description to xpath in this case.  We had tried below, but no success.

Desktop.Find("{TESTDocxMicrosoftWord.ServerEditInstructions.OK.GetLocators()}").Click()


Viewing all articles
Browse latest Browse all 625

Latest Images

Trending Articles



Latest Images

<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>