I was actually selecting a random link that has only anchors and h3 tags from google search page results in chrome browser in the web.
Web code was this that is working properly
Getting all a and h3 elements list
//TestObject tObjAnchors = new TestObject(‘all anchors’).addProperty(‘xpath’, ConditionType.EQUALS, ‘//a[./h3]’)
//List anchors = WebUI.findWebElements(tObjAnchors, 30)
that I was succeeded to do that. by using a random() function in the web
now the requirement is to do the same in mobile chrome browser. Here i see the random() function looks not working.
I am using the code like below for mobile browser:
MobileTestObject mobileObject = new MobileTestObject(‘all anchors’).setMobileLocatorStrategy(MobileLocatorStrategy.XPATH =’//a[./h3]’)
List anchors = WebUI.findWebElements(mobileObject, 30)
but it is not working
ANy suggestion plz