cisco-open-source/qtwebdriver

Hot find own Widget in namespace with xpath

xlazom00 opened this issue · 3 comments

I have QWidget base object with namespace
so qtwebdriver preset object as
<TE::SegmentTableView elementId="746d4cccbaa4c597e01eb1610b30847a" className="TE::SegmentTableView">

I don't have problem with elements with namespace prefix
but everything with namespace prefix is problem.
Is this bug?

//SegmentTableView nothing
//TE::SegmentTableView nothing
//TE\:\:SegmentTableView nothing

I also have this issue. The workaround I found was doing:

//*[@className='TE::SegmentTableView']

or, if the namespace is long, you could do:

//*[contains(@className, 'SegmentTableView')]

I'm no expert, but reading the code (here and here), it seems that they use the class name of the qt meta object (which, I believe, is generated by QT). So I don't know if there is real solution to this problem, but I hope I could help a little bit! :)

-Raphaël

//*[contains(@classname, 'SegmentTableView')] works find thx

Yes, xpath issue, like this one: https://stackoverflow.com/questions/3141823/escape-colon-in-xpath-search

//*[@className='TE::SegmentTableView']

is right way to search for such elements