using python for selenium. Not able to click on checkbox in Chrome however same scrip works in Firefox and able to select

prashant Source

for clicking, using following method:Updated

 def elementClick(self,locator, locatorType="id"):
    try:
        element = self.getElement(locator, locatorType)
        element.click()
        self.log.info("Clicked on element (method: elementClick) with locator: " + locator + " locator type: " + locatorType)
    except:
        self.log.info("Can not find or can not click on element (method: elementClick) with locator: " + locator + " locator type: " + locatorType)
        print_stack()

for clicking on random basis out of all possible options, using below method by calling in above method:

def geographicRegion(self):
    for x in range(0,11):            
       self.elementClick(self._geographicRegion[(random.randint(0,1000))%12], locatorType="xpath")

Please help!

python-3.xselenium-webdriver

Answers

comments powered by Disqus