Trying to Automate clap of medium.com
Some how clap option is not getting clicked on medium.com ,here is code and error
WebUI.openBrowser('https://accounts.google.com')
WebUI.maximizeWindow()
def driver = DriverFactory.getWebDriver()
String baseUrl = 'https://accounts.google.com'
selenium = new WebDriverBackedSelenium(driver, baseUrl)
selenium.open('https://accounts.google.com/signin/v2/identifier?passive=1209600&continue=https%3A%2F%2Faccounts.google.com%2FManageAccount&followup=https%3A%2F%2Faccounts.google.com%2FManageAccount&flowName=GlifWebSignIn&flowEntry=ServiceLogin')
selenium.type('id=identifierId', 'emailid')
WebUI.delay(5)
WebUI.click(findTestObject('Page_Gmail/Page_Gmail/content_Next'))
WebUI.delay(5)
selenium.type('name=password', 'passwd')
WebUI.click(findTestObject('Page_Gmail/Page_Gmail/span_Next'))
WebUI.delay(5)
selenium.open('https://medium.com/')
selenium.click('link=Sign in')
selenium.open('https://medium.com/s/user-friendly/why-im-done-saying-user-user-experience-and-ux-in-2019-4fdfc6b7de23')
WebUI.delay(4)
WebUI.click(findTestObject('Object Repository/Page_Medium a place to read and wr/button_Continue as george'))
WebUI.waitForElementClickable(findTestObject('Page_A New Test Predicts When Youll/clap'), 5)
WebUI.click(findTestObject('Page_A New Test Predicts When Youll/clap'), FailureHandling.STOP_ON_FAILURE)
Error in console i get:-
SLF4J: The requested version 1.7.16 by your slf4j binding is not compatible with [1.6]
SLF4J: See SLF4J Error Codes for further details.
2019-02-01 20:27:20.127 e[34mINFO e[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor -e[0;39m e[39m--------------------e[0;39m
2019-02-01 20:27:20.127 e[34mINFO e[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor -e[0;39m e[39mSTART Test Cases/mediume[0;39m
2019-02-01 20:27:24.502 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m1: openBrowser(âhttps://accounts.google.comâ)e[0;39m
2019-02-01 20:27:25.744 e[34mINFO e[0;39m e[36mc.k.k.core.webui.driver.DriverFactory -e[0;39m e[39mStarting âChromeâ drivere[0;39m
2019-02-01 20:27:25.816 e[34mINFO e[0;39m e[36mc.k.k.core.webui.driver.DriverFactory -e[0;39m e[39mAction delay is set to 0 secondse[0;39m
Starting ChromeDriver 2.43.600210 (68dcf5eebde37173d4027fa8635e332711d2874a) on port 35382
Only local connections are allowed.
Feb 01, 2019 8:27:37 PM org.openqa.selenium.remote.ProtocolHandshake createSession
INFO: Detected dialect: OSS
2019-02-01 20:27:37.716 e[34mINFO e[0;39m e[36mc.k.k.core.webui.driver.DriverFactory -e[0;39m e[39msessionId = 66373c7f8f554fa9603f1a22a0fbabd4e[0;39m
2019-02-01 20:27:37.802 e[34mINFO e[0;39m e[36mc.k.k.core.webui.driver.DriverFactory -e[0;39m e[39mbrowser = Chrome 71.0.3578.98e[0;39m
2019-02-01 20:27:37.803 e[34mINFO e[0;39m e[36mc.k.k.core.webui.driver.DriverFactory -e[0;39m e[39mplatform = Windows Server 2016e[0;39m
2019-02-01 20:27:37.812 e[34mINFO e[0;39m e[36mc.k.k.core.webui.driver.DriverFactory -e[0;39m e[39mseleniumVersion = 3.7.1e[0;39m
2019-02-01 20:27:37.815 e[34mINFO e[0;39m e[36mc.k.k.core.webui.driver.DriverFactory -e[0;39m e[39mproxyInformation = ProxyInformation{proxyOption=NO_PROXY, proxyServerType=HTTP, password=, proxyServerAddress=, proxyServerPort=0}e[0;39m
2019-02-01 20:27:41.934 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m2: maximizeWindow()e[0;39m
2019-02-01 20:27:43.322 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m3: driver = getWebDriver()e[0;39m
2019-02-01 20:27:43.350 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m4: baseUrl = "https://accounts.google.com"e[0;39m
2019-02-01 20:27:43.350 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m5: selenium = new com.thoughtworks.selenium.webdriven.WebDriverBackedSelenium(driver, baseUrl)e[0;39m
2019-02-01 20:27:43.502 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m6: selenium.open(âSign in - Google Accountsâ)e[0;39m
2019-02-01 20:27:45.541 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m7: selenium.type(âid=identifierIdâ, âgeorgejohn7866â)e[0;39m
2019-02-01 20:27:45.918 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m8: delay(5)e[0;39m
2019-02-01 20:27:50.967 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m9: click(findTestObject(âPage_Gmail/Page_Gmail/content_Nextâ))e[0;39m
2019-02-01 20:27:51.614 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m10: delay(5)e[0;39m
2019-02-01 20:27:56.618 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m11: selenium.type(âname=passwordâ, âGeorge@321â)e[0;39m
2019-02-01 20:27:56.816 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m12: click(findTestObject(âPage_Gmail/Page_Gmail/span_Nextâ))e[0;39m
2019-02-01 20:27:57.135 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m13: delay(5)e[0;39m
2019-02-01 20:28:02.144 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m14: selenium.open(âhttps://medium.com/â)e[0;39m
2019-02-01 20:28:05.599 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m15: selenium.click(âlink=Sign inâ)e[0;39m
2019-02-01 20:28:06.595 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m16: selenium.open(âAs a Designer, I Refuse to Call People âUsersâ | by Adam Lefton | Mediumâ)e[0;39m
2019-02-01 20:28:08.393 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m17: delay(4)e[0;39m
2019-02-01 20:28:12.868 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m18: click(findTestObject(âObject Repository/Page_Medium a place to read and wr/button_Continue as georgeâ))e[0;39m
2019-02-01 20:28:13.473 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m19: waitForElementClickable(findTestObject(âPage_A New Test Predicts When Youll/clapâ), 5)e[0;39m
2019-02-01 20:28:19.777 e[34mINFO e[0;39m e[36mc.k.k.c.webui.common.WebUiCommonHelper -e[0;39m e[39mUnable to find the element located by 'By.xpath: '. Please recheck the objects properties to make sure the desired element is located. e[0;39m
2019-02-01 20:28:19.779 e[31mWARN e[0;39m e[36mk.c.w.k.b.WaitForElementClickableKeyword -e[0;39m e[39mWeb element with id: âObject Repository/Page_A New Test Predicts When Youll/clapâ located by 'By.xpath: â not founde[0;39m
2019-02-01 20:28:19.780 e[39mDEBUGe[0;39m e[36mtestcase.medium -e[0;39m e[39m20: click(findTestObject(âPage_A New Test Predicts When Youll/clapâ), STOP_ON_FAILURE)e[0;39m
2019-02-01 20:28:50.851 e[34mINFO e[0;39m e[36mc.k.k.c.webui.common.WebUiCommonHelper -e[0;39m e[39mUnable to find the element located by 'By.xpath: '. Please recheck the objects properties to make sure the desired element is located. e[0;39m
2019-02-01 20:28:51.673 e[1;31mERRORe[0;39m e[36mc.k.k.core.keyword.internal.KeywordMain -e[0;39m e[31mâ Unable to click on object âObject Repository/Page_A New Test Predicts When Youll/clapâ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: âObject Repository/Page_A New Test Predicts When Youll/clapâ located by 'By.xpath: â not found)e[0;39m
2019-02-01 20:28:51.721 e[1;31mERRORe[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor -e[0;39m e[31mâ click(findTestObject(âPage_A New Test Predicts When Youll/clapâ), STOP_ON_FAILURE) FAILED.e[0;39m
e[31mReason:e[0;39m
e[31mcom.kms.katalon.core.exception.StepFailedException: Unable to click on object âObject Repository/Page_A New Test Predicts When Youll/clapâ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: âObject Repository/Page_A New Test Predicts When Youll/clapâ located by 'By.xpath: â not found)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:604)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$3.call(Unknown Source)e[0;39m
e[31m at medium.run(medium:69)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)e[0;39m
e[31m at TempTestCase1549052829794.run(TempTestCase1549052829794.groovy:22)e[0;39m
2019-02-01 20:28:51.740 e[1;31mERRORe[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor -e[0;39m e[31mâ Test Cases/medium FAILED.e[0;39m
e[31mReason:e[0;39m
e[31mcom.kms.katalon.core.exception.StepFailedException: Unable to click on object âObject Repository/Page_A New Test Predicts When Youll/clapâ (Root cause: com.kms.katalon.core.webui.exception.WebElementNotFoundException: Web element with id: âObject Repository/Page_A New Test Predicts When Youll/clapâ located by 'By.xpath: â not found)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordMain.stepFailed(KeywordMain.groovy:36)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.stepFailed(WebUIKeywordMain.groovy:65)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.internal.WebUIKeywordMain.runKeyword(WebUIKeywordMain.groovy:27)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.click(ClickKeyword.groovy:86)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.builtin.ClickKeyword.execute(ClickKeyword.groovy:67)e[0;39m
e[31m at com.kms.katalon.core.keyword.internal.KeywordExecutor.executeKeywordForPlatform(KeywordExecutor.groovy:53)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords.click(WebUiBuiltInKeywords.groovy:604)e[0;39m
e[31m at com.kms.katalon.core.webui.keyword.WebUiBuiltInKeywords$click$3.call(Unknown Source)e[0;39m
e[31m at medium.run(medium:69)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.run(ScriptEngine.java:194)e[0;39m
e[31m at com.kms.katalon.core.main.ScriptEngine.runScriptAsRawText(ScriptEngine.java:119)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.runScript(TestCaseExecutor.java:328)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.doExecute(TestCaseExecutor.java:319)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.processExecutionPhase(TestCaseExecutor.java:298)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.accessMainPhase(TestCaseExecutor.java:290)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseExecutor.execute(TestCaseExecutor.java:224)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:106)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain.runTestCase(TestCaseMain.java:97)e[0;39m
e[31m at com.kms.katalon.core.main.TestCaseMain$runTestCase$0.call(Unknown Source)e[0;39m
e[31m at TempTestCase1549052829794.run(TempTestCase1549052829794.groovy:22)e[0;39m
2019-02-01 20:28:51.740 e[34mINFO e[0;39m e[36mc.k.katalon.core.main.TestCaseExecutor -e[0;39m e[39mEND Test Cases/medium
Xpath for clap
(.//*[normalize-space(text()) and normalize-space(.)=âMarina Posniakâ])[1]/following::button[1]
Interstingly when i try to find element using above xpath,i am able to find the clap element but dont know why katalon unable to find and then click it,if nothing works i may have to switch from katalon to python programming