How to use driver.FindElementById method in Appium

Best JavaScript code snippet using appium

src-tree-yaml.js

Source:src-tree-yaml.js Github

copy

Full Screen

1/**2 * @type {string}3 */4sahagin.srcTreeYamlStr = (function(){/*5rootClassTable:6 classes:7 - methodKeys: [ios.TestFuc.testIOS-void]8 key: ios.TestFuc9 qname: ios.TestFuc10 - methodKeys: [android.TestAndroid.testAndroid-void]11 key: android.TestAndroid12 qname: android.TestAndroid13formatVersion: 0.9.214rootMethodTable:15 methods:16 - name: testIOS17 classKey: ios.TestFuc18 codeBody:19 - endLine: 5120 startLine: 5121 code:22 args:23 - {original: '"http://www.test-arts.cn/isms/"', type: string, value: 'http://www.test-arts.cn/isms/'}24 methodKey: org.openqa.selenium.WebDriver.get25 childInvoke: true26 original: driver.get("http://www.test-arts.cn/isms/");27 type: method28 thisInstance: {original: driver, type: unknown}29 - endLine: 5430 startLine: 5431 code: {original: LoginPage lp=new LoginPage(driver);, type: unknown}32 - endLine: 5533 startLine: 5534 code: {original: HomePage hp=new HomePage(driver);, type: unknown}35 - endLine: 5736 startLine: 5737 code:38 args:39 - {original: '"test"', type: string, value: test}40 methodKey: pages.LoginPage.setUserId-String41 original: lp.setUserId("test");42 type: method43 thisInstance: {name: lp, original: lp, type: localVar}44 - endLine: 5845 startLine: 5846 code:47 args:48 - {original: '"test"', type: string, value: test}49 methodKey: pages.LoginPage.setPassword-String50 original: lp.setPassword("test");51 type: method52 thisInstance: {name: lp, original: lp, type: localVar}53 - endLine: 5954 startLine: 5955 code:56 methodKey: pages.LoginPage.okBtnClick-void57 original: lp.okBtnClick();58 type: method59 thisInstance: {name: lp, original: lp, type: localVar}60 - endLine: 6061 startLine: 6062 code:63 methodKey: pages.HomePage.showHistoryBtnClick-void64 original: hp.showHistoryBtnClick();65 type: method66 thisInstance: {name: hp, original: hp, type: localVar}67 - endLine: 6168 startLine: 6169 code:70 methodKey: pages.HomePage.analysBtnClick-void71 original: hp.analysBtnClick();72 type: method73 thisInstance: {name: hp, original: hp, type: localVar}74 - endLine: 6275 startLine: 6276 code:77 methodKey: pages.HomePage.historyBtnClick-void78 original: hp.historyBtnClick();79 type: method80 thisInstance: {name: hp, original: hp, type: localVar}81 key: ios.TestFuc.testIOS-void82 - name: testAndroid83 classKey: android.TestAndroid84 codeBody:85 - endLine: 4286 startLine: 4287 code:88 args:89 - {original: '"http://www.test-arts.cn/isms/"', type: string, value: 'http://www.test-arts.cn/isms/'}90 methodKey: org.openqa.selenium.WebDriver.get91 childInvoke: true92 original: driver.get("http://www.test-arts.cn/isms/");93 type: method94 thisInstance: {original: driver, type: unknown}95 - endLine: 4396 startLine: 4397 code: {original: LoginPage lp=new LoginPage(driver);, type: unknown}98 - endLine: 4499 startLine: 44100 code: {original: HomePage hp=new HomePage(driver);, type: unknown}101 - endLine: 45102 startLine: 45103 code:104 args:105 - {original: '"test"', type: string, value: test}106 methodKey: pages.LoginPage.setUserId-String107 original: lp.setUserId("test");108 type: method109 thisInstance: {name: lp, original: lp, type: localVar}110 - endLine: 46111 startLine: 46112 code:113 args:114 - {original: '"test"', type: string, value: test}115 methodKey: pages.LoginPage.setPassword-String116 original: lp.setPassword("test");117 type: method118 thisInstance: {name: lp, original: lp, type: localVar}119 - endLine: 47120 startLine: 47121 code:122 methodKey: pages.LoginPage.okBtnClick-void123 original: lp.okBtnClick();124 type: method125 thisInstance: {name: lp, original: lp, type: localVar}126 - endLine: 48127 startLine: 48128 code:129 methodKey: pages.HomePage.showHistoryBtnClick-void130 original: hp.showHistoryBtnClick();131 type: method132 thisInstance: {name: hp, original: hp, type: localVar}133 - endLine: 49134 startLine: 49135 code:136 methodKey: pages.HomePage.analysBtnClick-void137 original: hp.analysBtnClick();138 type: method139 thisInstance: {name: hp, original: hp, type: localVar}140 - endLine: 50141 startLine: 50142 code:143 methodKey: pages.HomePage.historyBtnClick-void144 original: hp.historyBtnClick();145 type: method146 thisInstance: {name: hp, original: hp, type: localVar}147 key: android.TestAndroid.testAndroid-void148subMethodTable:149 methods:150 - name: studyBtnClick151 testDoc: click study button152 classKey: pages.HomePage153 codeBody:154 - endLine: 19155 startLine: 19156 code:157 methodKey: org.openqa.selenium.WebElement.click158 original: driver.findElementById("studyBtn_00").click();159 type: method160 thisInstance:161 args:162 - {original: '"studyBtn_00"', type: string, value: studyBtn_00}163 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementById164 childInvoke: true165 original: driver.findElementById("studyBtn_00")166 type: method167 thisInstance: {original: driver, type: unknown}168 - endLine: 20169 startLine: 20170 code: {original: Thread.sleep(2000);, type: unknown}171 key: pages.HomePage.studyBtnClick-void172 - name: showHistoryBtnClick173 testDoc: click showHistory button174 classKey: pages.HomePage175 codeBody:176 - endLine: 25177 startLine: 25178 code:179 methodKey: org.openqa.selenium.WebElement.click180 original: driver.findElementById("showHistoryBtn").click();181 type: method182 thisInstance:183 args:184 - {original: '"showHistoryBtn"', type: string, value: showHistoryBtn}185 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementById186 childInvoke: true187 original: driver.findElementById("showHistoryBtn")188 type: method189 thisInstance: {original: driver, type: unknown}190 - endLine: 26191 startLine: 26192 code: {original: Thread.sleep(2000);, type: unknown}193 key: pages.HomePage.showHistoryBtnClick-void194 - name: analysBtnClick195 testDoc: click analys button196 classKey: pages.HomePage197 codeBody:198 - endLine: 31199 startLine: 31200 code:201 methodKey: org.openqa.selenium.WebElement.click202 original: driver.findElementById("analysBtn0").click();203 type: method204 thisInstance:205 args:206 - {original: '"analysBtn0"', type: string, value: analysBtn0}207 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementById208 childInvoke: true209 original: driver.findElementById("analysBtn0")210 type: method211 thisInstance: {original: driver, type: unknown}212 - endLine: 32213 startLine: 32214 code: {original: Thread.sleep(2000);, type: unknown}215 key: pages.HomePage.analysBtnClick-void216 - name: historyBtnClick217 testDoc: click history button218 classKey: pages.HomePage219 codeBody:220 - endLine: 37221 startLine: 37222 code:223 methodKey: org.openqa.selenium.WebElement.click224 original: driver.findElementById("historyBtn0").click();225 type: method226 thisInstance:227 args:228 - {original: '"historyBtn0"', type: string, value: historyBtn0}229 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementById230 childInvoke: true231 original: driver.findElementById("historyBtn0")232 type: method233 thisInstance: {original: driver, type: unknown}234 - endLine: 38235 startLine: 38236 code: {original: Thread.sleep(2000);, type: unknown}237 key: pages.HomePage.historyBtnClick-void238 - name: dataBtnClick239 testDoc: 情報セキュリティ 2016年度版240 classKey: pages.DataSecurity241 codeBody:242 - endLine: 22243 startLine: 22244 code:245 methodKey: org.openqa.selenium.WebElement.click246 original: driver.findElementByLinkText("情報セキュリティ 2016年度版").click();247 type: method248 thisInstance:249 args:250 - {original: '"情報セキュリティ 2016年度版"', type: string, value: 情報セキュリティ 2016年度版}251 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText252 childInvoke: true253 original: driver.findElementByLinkText("情報セキュリティ 2016年度版")254 type: method255 thisInstance: {original: driver, type: unknown}256 - endLine: 23257 startLine: 23258 code: {original: Thread.sleep(5000);, type: unknown}259 key: pages.DataSecurity.dataBtnClick-void260 - name: iosNextBtnClick261 testDoc: 次へios262 classKey: pages.DataSecurity263 codeBody:264 - endLine: 30265 startLine: 30266 code:267 original: List<WebElement> list=driver.findElementsByClassName("XCUIElementTypeButton");268 type: varAssign269 value:270 args:271 - {original: '"XCUIElementTypeButton"', type: string, value: XCUIElementTypeButton}272 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementsByClassName273 childInvoke: true274 original: driver.findElementsByClassName("XCUIElementTypeButton")275 type: method276 thisInstance: {original: driver, type: unknown}277 var: {name: list, original: list, type: localVar}278 - endLine: 31279 startLine: 31280 code: {original: System.out.println(list.size());, type: unknown}281 - endLine: 32282 startLine: 32283 code:284 methodKey: org.openqa.selenium.WebElement.click285 original: list.get(0).click();286 type: method287 thisInstance:288 args:289 - {original: '0', type: unknown}290 methodKey: java.util.List.get291 original: list.get(0)292 type: method293 thisInstance: {name: list, original: list, type: localVar}294 key: pages.DataSecurity.iosNextBtnClick-void295 - name: androidNextBtnClick296 testDoc: 次へandroid297 classKey: pages.DataSecurity298 codeBody:299 - endLine: 40300 startLine: 40301 code:302 methodKey: org.openqa.selenium.WebElement.click303 original: driver.findElementByXPath("//android.widget.FrameLayout[@resource-id='com.android.chrome:id/compositor_view_holder']/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View/android.view.View[2]/android.view.View[2]/android.widget.Button[2]").click();304 type: method305 thisInstance:306 args:307 - {original: '"//android.widget.FrameLayout[@resource-id=''com.android.chrome:id/compositor_view_holder'']/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View/android.view.View[2]/android.view.View[2]/android.widget.Button[2]"',308 type: string, value: '//android.widget.FrameLayout[@resource-id=''com.android.chrome:id/compositor_view_holder'']/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View/android.view.View[2]/android.view.View[2]/android.widget.Button[2]'}309 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath310 childInvoke: true311 original: driver.findElementByXPath("//android.widget.FrameLayout[@resource-id='com.android.chrome:id/compositor_view_holder']/android.widget.FrameLayout[2]/android.webkit.WebView/android.view.View/android.view.View/android.view.View[2]/android.view.View[2]/android.widget.Button[2]")312 type: method313 thisInstance: {original: driver, type: unknown}314 key: pages.DataSecurity.androidNextBtnClick-void315 - name: setUserId316 testDoc: set ID317 classKey: pages.LoginPage318 argVariables: [value]319 codeBody:320 - endLine: 20321 startLine: 20322 code:323 args:324 - {original: value, type: arg, argIndex: 0}325 methodKey: org.openqa.selenium.WebElement.sendKeys326 original: driver.findElementById("j_username").sendKeys(value);327 type: method328 thisInstance:329 args:330 - {original: '"j_username"', type: string, value: j_username}331 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementById332 childInvoke: true333 original: driver.findElementById("j_username")334 type: method335 thisInstance: {original: driver, type: unknown}336 key: pages.LoginPage.setUserId-String337 - name: setPassword338 testDoc: set PSW339 classKey: pages.LoginPage340 argVariables: [value]341 codeBody:342 - endLine: 25343 startLine: 25344 code:345 args:346 - {original: value, type: arg, argIndex: 0}347 methodKey: org.openqa.selenium.WebElement.sendKeys348 original: driver.findElementById("j_password").sendKeys(value);349 type: method350 thisInstance:351 args:352 - {original: '"j_password"', type: string, value: j_password}353 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementById354 childInvoke: true355 original: driver.findElementById("j_password")356 type: method357 thisInstance: {original: driver, type: unknown}358 key: pages.LoginPage.setPassword-String359 - name: okBtnClick360 testDoc: click ok button361 classKey: pages.LoginPage362 codeBody:363 - endLine: 30364 startLine: 30365 code:366 methodKey: org.openqa.selenium.WebElement.click367 original: driver.findElementById("loginBtn").click();368 type: method369 thisInstance:370 args:371 - {original: '"loginBtn"', type: string, value: loginBtn}372 methodKey: org.openqa.selenium.remote.RemoteWebDriver.findElementById373 childInvoke: true374 original: driver.findElementById("loginBtn")375 type: method376 thisInstance: {original: driver, type: unknown}377 - endLine: 31378 startLine: 31379 code: {original: Thread.sleep(2000);, type: unknown}380 key: pages.LoginPage.okBtnClick-void381 - {name: assert, testDoc: 'check that {0}', capture: none, classKey: javaSystem,382 key: javaSystem.assert}383 - {name: equals, testDoc: '''{0}'' equals to ''{1}''', capture: none, classKey: javaSystem,384 key: javaSystem.equals}385 - {name: notEquals, testDoc: '''{0}'' does not equal to ''{1}''', capture: none,386 classKey: javaSystem, key: javaSystem.notEquals}387 - {name: assertEquals, testDoc: '', classKey: junit.framework.Assert, key: 'junit.framework.Assert.assertEquals-double,double'}388 - {name: assertEquals, testDoc: '', classKey: junit.framework.Assert, key: 'junit.framework.Assert.assertEquals-long,long'}389 - {name: assertEquals, testDoc: '', classKey: junit.framework.Assert, key: 'junit.framework.Assert.assertEquals-Object,Object'}390 - {name: assertEquals, testDoc: '', classKey: junit.framework.Assert, key: 'junit.framework.Assert.assertEquals-Object[],Object[]'}391 - {name: is, testDoc: 'equals to ''{0}''', capture: none, classKey: org.hamcrest.core.Is,392 key: org.hamcrest.core.Is.is-Object}393 - {name: is, testDoc: '{0}', capture: none, classKey: org.hamcrest.core.Is, key: org.hamcrest.core.Is.is-org.hamcrest.Matcher}394 - {name: not, testDoc: 'does not equal to ''{0}''', capture: none, classKey: org.hamcrest.core.IsNot,395 key: org.hamcrest.core.IsNot.not-Object}396 - {name: not, testDoc: 'does not equal to ''{0}''', capture: none, classKey: org.hamcrest.core.IsNot,397 key: org.hamcrest.core.IsNot.not-org.hamcrest.Matcher}398 - {name: is, testDoc: 'equals to ''{0}''', capture: none, classKey: org.hamcrest.CoreMatchers,399 key: org.hamcrest.CoreMatchers.is-Object}400 - {name: is, testDoc: '{0}', capture: none, classKey: org.hamcrest.CoreMatchers,401 key: org.hamcrest.CoreMatchers.is-org.hamcrest.Matcher}402 - {name: not, testDoc: 'does not equal to ''{0}''', capture: none, classKey: org.hamcrest.CoreMatchers,403 key: org.hamcrest.CoreMatchers.not-Object}404 - {name: not, testDoc: 'does not equal to ''{0}''', capture: none, classKey: org.hamcrest.CoreMatchers,405 key: org.hamcrest.CoreMatchers.not-org.hamcrest.Matcher}406 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.junit.Assert,407 key: 'org.junit.Assert.assertEquals-double,double'}408 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.junit.Assert,409 key: 'org.junit.Assert.assertEquals-long,long'}410 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.junit.Assert,411 key: 'org.junit.Assert.assertEquals-Object,Object'}412 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.junit.Assert,413 key: 'org.junit.Assert.assertEquals-Object[],Object[]'}414 - {name: assertThat, testDoc: 'check that ''{0}'' {1}', classKey: org.junit.Assert,415 key: 'org.junit.Assert.assertThat-Object,org.hamcrest.Matcher'}416 - {name: assertThat, testDoc: 'check that ''{1}'' {2}', classKey: org.junit.Assert,417 key: 'org.junit.Assert.assertThat-String,Object,org.hamcrest.Matcher'}418 - {name: assertThat, testDoc: 'check that ''{0}'' {1}', classKey: org.hamcrest.MatcherAssert,419 key: 'org.hamcrest.MatcherAssert.assertThat-Object,org.hamcrest.Matcher'}420 - {name: assertThat, testDoc: 'check that ''{1}'' {2}', classKey: org.hamcrest.MatcherAssert,421 key: 'org.hamcrest.MatcherAssert.assertThat-String,Object,org.hamcrest.Matcher'}422 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.testng.Assert,423 key: 'org.testng.Assert.assertEquals-boolean,boolean'}424 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.testng.Assert,425 key: 'org.testng.Assert.assertEquals-int,int'}426 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.testng.Assert,427 key: 'org.testng.Assert.assertEquals-long,long'}428 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.testng.Assert,429 key: 'org.testng.Assert.assertEquals-Object,Object'}430 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.testng.Assert,431 key: 'org.testng.Assert.assertEquals-Object[],Object[]'}432 - {name: assertEquals, testDoc: 'check that ''{0}'' equals to ''{1}''', classKey: org.testng.Assert,433 key: 'org.testng.Assert.assertEquals-String,String'}434 - {name: get, testDoc: '''{0}''th element of ''{this}''', capture: none, classKey: java.util.List,435 key: java.util.List.get}436 - {name: className, testDoc: 'class name = {0}', capture: none, classKey: org.openqa.selenium.By,437 key: org.openqa.selenium.By.className}438 - {name: cssSelector, testDoc: 'css = {0}', capture: none, classKey: org.openqa.selenium.By,439 key: org.openqa.selenium.By.cssSelector}440 - {name: id, testDoc: 'id = {0}', capture: none, classKey: org.openqa.selenium.By,441 key: org.openqa.selenium.By.id}442 - {name: linkText, testDoc: 'text = {0}', capture: none, classKey: org.openqa.selenium.By,443 key: org.openqa.selenium.By.linkText}444 - {name: name, testDoc: 'name = {0}', capture: none, classKey: org.openqa.selenium.By,445 key: org.openqa.selenium.By.name}446 - {name: partialLinkText, testDoc: 'text = {0}(partial match)', capture: none, classKey: org.openqa.selenium.By,447 key: org.openqa.selenium.By.partialLinkText}448 - {name: tagName, testDoc: 'tag name = {0}', capture: none, classKey: org.openqa.selenium.By,449 key: org.openqa.selenium.By.tagName}450 - {name: xpath, testDoc: 'xpath = {0}', capture: none, classKey: org.openqa.selenium.By,451 key: org.openqa.selenium.By.xpath}452 - {name: findElementByClassName, testDoc: 'element ''class name = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,453 key: org.openqa.selenium.remote.RemoteWebDriver.findElementByClassName}454 - {name: findElementByCssSelector, testDoc: 'element ''css = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,455 key: org.openqa.selenium.remote.RemoteWebDriver.findElementByCssSelector}456 - {name: findElementById, testDoc: 'element ''id = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,457 key: org.openqa.selenium.remote.RemoteWebDriver.findElementById}458 - {name: findElementByLinkText, testDoc: 'element ''text = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,459 key: org.openqa.selenium.remote.RemoteWebDriver.findElementByLinkText}460 - {name: findElementByName, testDoc: 'element ''name = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,461 key: org.openqa.selenium.remote.RemoteWebDriver.findElementByName}462 - {name: findElementByPartialLinkText, testDoc: 'element ''text = {0}(partial match)''',463 classKey: org.openqa.selenium.remote.RemoteWebDriver, key: org.openqa.selenium.remote.RemoteWebDriver.findElementByPartialLinkText}464 - {name: findElementByTagName, testDoc: 'element ''tag name = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,465 key: org.openqa.selenium.remote.RemoteWebDriver.findElementByTagName}466 - {name: findElementByXPath, testDoc: 'element ''xpath = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,467 key: org.openqa.selenium.remote.RemoteWebDriver.findElementByXPath}468 - {name: findElementsByClassName, testDoc: 'all elements for ''class name = {0}''',469 classKey: org.openqa.selenium.remote.RemoteWebDriver, key: org.openqa.selenium.remote.RemoteWebDriver.findElementsByClassName}470 - {name: findElementsByCssSelector, testDoc: 'all elements for ''css = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,471 key: org.openqa.selenium.remote.RemoteWebDriver.findElementsByCssSelector}472 - {name: findElementsById, testDoc: 'all elements for ''id = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,473 key: org.openqa.selenium.remote.RemoteWebDriver.findElementsById}474 - {name: findElementsByLinkText, testDoc: 'all elements for ''text = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,475 key: org.openqa.selenium.remote.RemoteWebDriver.findElementsByLinkText}476 - {name: findElementsByName, testDoc: 'all elements for ''name = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,477 key: org.openqa.selenium.remote.RemoteWebDriver.findElementsByName}478 - {name: findElementsByPartialLinkText, testDoc: 'all elements for ''text = {0}(partial479 match)''', classKey: org.openqa.selenium.remote.RemoteWebDriver, key: org.openqa.selenium.remote.RemoteWebDriver.findElementsByPartialLinkText}480 - {name: findElementsByTagName, testDoc: 'all elements for ''tag name = {0}''',481 classKey: org.openqa.selenium.remote.RemoteWebDriver, key: org.openqa.selenium.remote.RemoteWebDriver.findElementsByTagName}482 - {name: findElementsByXPath, testDoc: 'all elements for ''xpath = {0}''', classKey: org.openqa.selenium.remote.RemoteWebDriver,483 key: org.openqa.selenium.remote.RemoteWebDriver.findElementsByXPath}484 - {name: getOrientation, testDoc: the screen orientation, classKey: org.openqa.selenium.Rotatable,485 key: org.openqa.selenium.Rotatable.getOrientation}486 - {name: rotate, testDoc: 'rotate the screen to {0}', classKey: org.openqa.selenium.Rotatable,487 key: org.openqa.selenium.Rotatable.rotate}488 - {name: Select, testDoc: 'pull-down for {0}', classKey: org.openqa.selenium.support.ui.Select,489 key: org.openqa.selenium.support.ui.Select.Select}490 - {name: selectByIndex, testDoc: 'select ''{0}''th item of {this}', classKey: org.openqa.selenium.support.ui.Select,491 key: org.openqa.selenium.support.ui.Select.selectByIndex}492 - {name: selectByValue, testDoc: 'select ''value = {0}'' item of {this}', classKey: org.openqa.selenium.support.ui.Select,493 key: org.openqa.selenium.support.ui.Select.selectByValue}494 - {name: selectByVisibleText, testDoc: 'select ''text = {0}'' item of {this}', classKey: org.openqa.selenium.support.ui.Select,495 key: org.openqa.selenium.support.ui.Select.selectByVisibleText}496 - {name: close, testDoc: close the current window, classKey: org.openqa.selenium.WebDriver,497 key: org.openqa.selenium.WebDriver.close}498 - {name: findElement, testDoc: 'element ''{0}''', classKey: org.openqa.selenium.WebDriver,499 key: org.openqa.selenium.WebDriver.findElement}500 - {name: findElements, testDoc: 'all elements for ''{0}''', classKey: org.openqa.selenium.WebDriver,501 key: org.openqa.selenium.WebDriver.findElements}502 - {name: get, testDoc: 'go to the page ''{0}''', classKey: org.openqa.selenium.WebDriver,503 key: org.openqa.selenium.WebDriver.get}504 - {name: getCurrentUrl, testDoc: the current URL, classKey: org.openqa.selenium.WebDriver,505 key: org.openqa.selenium.WebDriver.getCurrentUrl}506 - {name: getTitle, testDoc: the page title, classKey: org.openqa.selenium.WebDriver,507 key: org.openqa.selenium.WebDriver.getTitle}508 - {name: quit, testDoc: terminate the browser, classKey: org.openqa.selenium.WebDriver,509 key: org.openqa.selenium.WebDriver.quit}510 - {name: back, testDoc: go back to the previous page, classKey: org.openqa.selenium.WebDriver$Navigation,511 key: org.openqa.selenium.WebDriver$Navigation.back}512 - {name: forward, testDoc: go forward to the next page, classKey: org.openqa.selenium.WebDriver$Navigation,513 key: org.openqa.selenium.WebDriver$Navigation.forward}514 - {name: refresh, testDoc: reload the page, classKey: org.openqa.selenium.WebDriver$Navigation,515 key: org.openqa.selenium.WebDriver$Navigation.refresh}516 - {name: to, testDoc: 'go to the page ''{0}''', classKey: org.openqa.selenium.WebDriver$Navigation,517 key: org.openqa.selenium.WebDriver$Navigation.to}518 - {name: clear, testDoc: 'clear the text of {this}', classKey: org.openqa.selenium.WebElement,519 key: org.openqa.selenium.WebElement.clear}520 - {name: click, testDoc: 'click {this}', classKey: org.openqa.selenium.WebElement,521 key: org.openqa.selenium.WebElement.click}522 - {name: getAttribute, testDoc: 'the ''{0}'' attribute of {this}', classKey: org.openqa.selenium.WebElement,523 key: org.openqa.selenium.WebElement.getAttribute}524 - {name: getText, testDoc: 'the text of {this}', classKey: org.openqa.selenium.WebElement,525 key: org.openqa.selenium.WebElement.getText}526 - {name: isDisplayed, testDoc: 'is {this} displayed', classKey: org.openqa.selenium.WebElement,527 key: org.openqa.selenium.WebElement.isDisplayed}528 - {name: isEnabled, testDoc: 'is {this} enabled', classKey: org.openqa.selenium.WebElement,529 key: org.openqa.selenium.WebElement.isEnabled}530 - {name: isSelected, testDoc: 'is {this} selected', classKey: org.openqa.selenium.WebElement,531 key: org.openqa.selenium.WebElement.isSelected}532 - {name: sendKeys, testDoc: 'send keys ''{0}'' to {this}', classKey: org.openqa.selenium.WebElement,533 key: org.openqa.selenium.WebElement.sendKeys}534 - {name: submit, testDoc: submit the form data, classKey: org.openqa.selenium.WebElement,535 key: org.openqa.selenium.WebElement.submit}536 - {name: findElementByAndroidUIAutomator, testDoc: 'element ''Android UiAutomator537 = {0}''', classKey: io.appium.java_client.android.AndroidDriver, key: io.appium.java_client.android.AndroidDriver.findElementByAndroidUIAutomator}538 - {name: findElementsByAndroidUIAutomator, testDoc: 'all elements for ''Android539 UiAutomator = {0}''', classKey: io.appium.java_client.android.AndroidDriver,540 key: io.appium.java_client.android.AndroidDriver.findElementsByAndroidUIAutomator}541 - {name: isLocked, testDoc: is the screen locked, classKey: io.appium.java_client.android.AndroidDriver,542 key: io.appium.java_client.android.AndroidDriver.isLocked}543 - {name: findElementByAccessibilityId, testDoc: 'element ''accessibility ID = {0}''',544 classKey: io.appium.java_client.AppiumDriver, key: io.appium.java_client.AppiumDriver.findElementByAccessibilityId}545 - {name: findElementsByAccessibilityId, testDoc: 'all elements for ''accessibility546 ID = {0}''', classKey: io.appium.java_client.AppiumDriver, key: io.appium.java_client.AppiumDriver.findElementsByAccessibilityId}547 - {name: hideKeyboard, testDoc: hide the keyboard, classKey: io.appium.java_client.AppiumDriver,548 key: io.appium.java_client.AppiumDriver.hideKeyboard}549 - {name: lockScreen, testDoc: 'lock the screen for {0} seconds', classKey: io.appium.java_client.AppiumDriver,550 key: io.appium.java_client.AppiumDriver.lockScreen}551 - {name: pinch, testDoc: 'zoom out (x:{0}, y:{1}) by pinch-in', classKey: io.appium.java_client.AppiumDriver,552 key: 'io.appium.java_client.AppiumDriver.pinch-int,int'}553 - {name: pinch, testDoc: 'zoom out {0} by pinch-in', classKey: io.appium.java_client.AppiumDriver,554 key: io.appium.java_client.AppiumDriver.pinch-org.openqa.selenium.WebElement}555 - {name: swipe, testDoc: 'swipe from (x:{0}, y:{1}) to (x:{2}, y:{3}) in {4} milliseconds',556 classKey: io.appium.java_client.AppiumDriver, key: io.appium.java_client.AppiumDriver.swipe}557 - {name: tap, testDoc: 'tap (x:{1}, y:{2}) with {0} fingers for {3} milliseconds',558 classKey: io.appium.java_client.AppiumDriver, key: 'io.appium.java_client.AppiumDriver.tap-int,int,int,int'}559 - {name: tap, testDoc: 'tap {1} with {0} fingers for {2} milliseconds', classKey: io.appium.java_client.AppiumDriver,560 key: 'io.appium.java_client.AppiumDriver.tap-int,org.openqa.selenium.WebElement,int'}561 - {name: zoom, testDoc: 'zoom in (x:{0}, y:{1}) by pinch-out', classKey: io.appium.java_client.AppiumDriver,562 key: 'io.appium.java_client.AppiumDriver.zoom-int,int'}563 - {name: zoom, testDoc: 'zoom in {0} by pinch-out', classKey: io.appium.java_client.AppiumDriver,564 key: io.appium.java_client.AppiumDriver.zoom-org.openqa.selenium.WebElement}565 - {name: findElementByIosUIAutomation, testDoc: 'element ''iOS UIAutomation = {0}''',566 classKey: io.appium.java_client.ios.IOSDriver, key: io.appium.java_client.ios.IOSDriver.findElementByIosUIAutomation}567 - {name: findElementsByIosUIAutomation, testDoc: 'all elements for ''iOS UIAutomation568 = {0}''', classKey: io.appium.java_client.ios.IOSDriver, key: io.appium.java_client.ios.IOSDriver.findElementsByIosUIAutomation}569 - {name: shake, testDoc: shake the device, classKey: io.appium.java_client.ios.IOSDriver,570 key: io.appium.java_client.ios.IOSDriver.shake}571 - {name: AccessibilityId, testDoc: 'accessibility ID = {0}', capture: none, classKey: io.appium.java_client.MobileBy,572 key: io.appium.java_client.MobileBy.AccessibilityId}573 - {name: AndroidUIAutomator, testDoc: 'Android UiAutomator = {0}', capture: none,574 classKey: io.appium.java_client.MobileBy, key: io.appium.java_client.MobileBy.AndroidUIAutomator}575 - {name: IosUIAutomation, testDoc: 'iOS UIAutomation = {0}', capture: none, classKey: io.appium.java_client.MobileBy,576 key: io.appium.java_client.MobileBy.IosUIAutomation}577 - {name: with, testDoc: 'set text ''{0}'' to {this}', classKey: org.fluentlenium.core.action.FillConstructor,578 key: org.fluentlenium.core.action.FillConstructor.with}579 - {name: clear, testDoc: 'clear the text of {this}', classKey: org.fluentlenium.core.domain.FluentList,580 key: org.fluentlenium.core.domain.FluentList.clear}581 - {name: click, testDoc: 'click {this}', classKey: org.fluentlenium.core.domain.FluentList,582 key: org.fluentlenium.core.domain.FluentList.click}583 - {name: getAttribute, testDoc: 'the ''{0}'' attribute of {this}', classKey: org.fluentlenium.core.domain.FluentList,584 key: org.fluentlenium.core.domain.FluentList.getAttribute}585 - {name: getText, testDoc: 'the text of {this}', classKey: org.fluentlenium.core.domain.FluentList,586 key: org.fluentlenium.core.domain.FluentList.getText}587 - {name: getValue, testDoc: 'the value of {this}', classKey: org.fluentlenium.core.domain.FluentList,588 key: org.fluentlenium.core.domain.FluentList.getValue}589 - {name: clear, testDoc: 'clear the text of {this}', classKey: org.fluentlenium.core.domain.FluentWebElement,590 key: org.fluentlenium.core.domain.FluentWebElement.clear}591 - {name: click, testDoc: 'click {this}', classKey: org.fluentlenium.core.domain.FluentWebElement,592 key: org.fluentlenium.core.domain.FluentWebElement.click}593 - {name: getAttribute, testDoc: 'the ''{0}'' attribute of {this}', classKey: org.fluentlenium.core.domain.FluentWebElement,594 key: org.fluentlenium.core.domain.FluentWebElement.getAttribute}595 - {name: getText, testDoc: 'the text of {this}', classKey: org.fluentlenium.core.domain.FluentWebElement,596 key: org.fluentlenium.core.domain.FluentWebElement.getText}597 - {name: getValue, testDoc: 'the value of {this}', classKey: org.fluentlenium.core.domain.FluentWebElement,598 key: org.fluentlenium.core.domain.FluentWebElement.getValue}599 - {name: isDisplayed, testDoc: 'is {this} displayed', classKey: org.fluentlenium.core.domain.FluentWebElement,600 key: org.fluentlenium.core.domain.FluentWebElement.isDisplayed}601 - {name: isEnabled, testDoc: 'is {this} enabled', classKey: org.fluentlenium.core.domain.FluentWebElement,602 key: org.fluentlenium.core.domain.FluentWebElement.isEnabled}603 - {name: isSelected, testDoc: 'is {this} selected', classKey: org.fluentlenium.core.domain.FluentWebElement,604 key: org.fluentlenium.core.domain.FluentWebElement.isSelected}605 - {name: withClass, testDoc: 'class = {0}', capture: none, classKey: org.fluentlenium.core.filter.FilterConstructor,606 key: org.fluentlenium.core.filter.FilterConstructor.withClass-String}607 - {name: withName, testDoc: 'name = {0}', capture: none, classKey: org.fluentlenium.core.filter.FilterConstructor,608 key: org.fluentlenium.core.filter.FilterConstructor.withName-String}609 - {name: withText, testDoc: 'text = {0}', capture: none, classKey: org.fluentlenium.core.filter.FilterConstructor,610 key: org.fluentlenium.core.filter.FilterConstructor.withText-String}611 - {name: $, testDoc: 'element ''{0}{if:1} ({1}){end}''', classKey: org.fluentlenium.core.Fluent,612 varLengthArgIndex: 1, key: 'org.fluentlenium.core.Fluent.$-String,org.fluentlenium.core.filter.Filter[]'}613 - {name: $, testDoc: '''{1}''th element of ''{0}{if:2} ({2}){end}''', classKey: org.fluentlenium.core.Fluent,614 varLengthArgIndex: 2, key: 'org.fluentlenium.core.Fluent.$-String,java.lang.Integer,org.fluentlenium.core.filter.Filter[]'}615 - {name: clear, testDoc: 'clear the text of element ''{0}{if:1} ({1}){end}''', classKey: org.fluentlenium.core.Fluent,616 varLengthArgIndex: 1, key: org.fluentlenium.core.Fluent.clear}617 - {name: click, testDoc: 'click element ''{0}{if:1} ({1}){end}''', classKey: org.fluentlenium.core.Fluent,618 varLengthArgIndex: 1, key: org.fluentlenium.core.Fluent.click}619 - {name: executeScript, testDoc: 'execute JavaScript ''{0}''', classKey: org.fluentlenium.core.Fluent,620 varLengthArgIndex: 1, key: org.fluentlenium.core.Fluent.executeScript}621 - {name: fill, testDoc: 'element ''{0}{if:1} ({1}){end}''', classKey: org.fluentlenium.core.Fluent,622 varLengthArgIndex: 1, key: org.fluentlenium.core.Fluent.fill}623 - {name: find, testDoc: 'element ''{0}{if:1} ({1}){end}''', classKey: org.fluentlenium.core.Fluent,624 varLengthArgIndex: 1, key: 'org.fluentlenium.core.Fluent.find-String,org.fluentlenium.core.filter.Filter[]'}625 - {name: find, testDoc: '''{1}''th element of ''{0}{if:2} ({2}){end}''', classKey: org.fluentlenium.core.Fluent,626 varLengthArgIndex: 2, key: 'org.fluentlenium.core.Fluent.find-String,java.lang.Integer,org.fluentlenium.core.filter.Filter[]'}627 - {name: findFirst, testDoc: 'first element of ''{0}{if:1} ({1}){end}''', classKey: org.fluentlenium.core.Fluent,628 varLengthArgIndex: 1, key: 'org.fluentlenium.core.Fluent.findFirst-String,org.fluentlenium.core.filter.Filter[]'}629 - {name: goTo, testDoc: 'go to the page ''{0}''', classKey: org.fluentlenium.core.Fluent,630 key: org.fluentlenium.core.Fluent.goTo-String}631 - {name: goTo, testDoc: 'go to the page ''{0}''', classKey: org.fluentlenium.core.Fluent,632 key: org.fluentlenium.core.Fluent.goTo-org.fluentlenium.core.FluentPage}633 - {name: takeScreenShot, testDoc: 'save screen capture to ''{0}''', classKey: org.fluentlenium.core.Fluent,634 key: org.fluentlenium.core.Fluent.takeScreenShot-String}635 - {name: title, testDoc: 'page title of {this}', classKey: org.fluentlenium.core.Fluent,636 key: org.fluentlenium.core.Fluent.title}637 - {name: go, testDoc: 'go to the page ''{this}''', classKey: org.fluentlenium.core.FluentPage,638 key: org.fluentlenium.core.FluentPage.go}639 - {name: isAt, testDoc: 'check that the current page is ''{this}''', classKey: org.fluentlenium.core.FluentPage,640 key: org.fluentlenium.core.FluentPage.isAt}641subClassTable:642 classes:643 - testDoc: home page644 methodKeys: [pages.HomePage.studyBtnClick-void, pages.HomePage.showHistoryBtnClick-void,645 pages.HomePage.analysBtnClick-void, pages.HomePage.historyBtnClick-void]646 type: page647 key: pages.HomePage648 qname: pages.HomePage649 - testDoc: dataSecurity page650 methodKeys: [pages.DataSecurity.dataBtnClick-void, pages.DataSecurity.iosNextBtnClick-void,651 pages.DataSecurity.androidNextBtnClick-void]652 type: page653 key: pages.DataSecurity654 qname: pages.DataSecurity655 - testDoc: login page656 methodKeys: [pages.LoginPage.setUserId-String, pages.LoginPage.setPassword-String,657 pages.LoginPage.okBtnClick-void]658 type: page659 key: pages.LoginPage660 qname: pages.LoginPage661 - {key: javaSystem, qname: javaSystem}662 - {key: junit.framework.Assert, qname: junit.framework.Assert}663 - {key: org.hamcrest.core.Is, qname: org.hamcrest.core.Is}664 - {key: org.hamcrest.core.IsNot, qname: org.hamcrest.core.IsNot}665 - {key: org.hamcrest.CoreMatchers, qname: org.hamcrest.CoreMatchers}666 - {key: org.junit.Assert, qname: org.junit.Assert}667 - {key: org.hamcrest.MatcherAssert, qname: org.hamcrest.MatcherAssert}668 - {key: org.testng.Assert, qname: org.testng.Assert}669 - {key: java.util.List, qname: java.util.List}670 - {key: org.openqa.selenium.By, qname: org.openqa.selenium.By}671 - {key: org.openqa.selenium.remote.RemoteWebDriver, qname: org.openqa.selenium.remote.RemoteWebDriver}672 - {key: org.openqa.selenium.Rotatable, qname: org.openqa.selenium.Rotatable}673 - {key: org.openqa.selenium.support.ui.Select, qname: org.openqa.selenium.support.ui.Select}674 - {key: org.openqa.selenium.WebDriver, qname: org.openqa.selenium.WebDriver}675 - {key: org.openqa.selenium.WebDriver$Navigation, qname: org.openqa.selenium.WebDriver$Navigation}676 - {key: org.openqa.selenium.WebElement, qname: org.openqa.selenium.WebElement}677 - {key: io.appium.java_client.android.AndroidDriver, qname: io.appium.java_client.android.AndroidDriver}678 - {key: io.appium.java_client.AppiumDriver, qname: io.appium.java_client.AppiumDriver}679 - {key: io.appium.java_client.ios.IOSDriver, qname: io.appium.java_client.ios.IOSDriver}680 - {key: io.appium.java_client.MobileBy, qname: io.appium.java_client.MobileBy}681 - {key: org.fluentlenium.core.action.FillConstructor, qname: org.fluentlenium.core.action.FillConstructor}682 - {key: org.fluentlenium.core.domain.FluentList, qname: org.fluentlenium.core.domain.FluentList}683 - {key: org.fluentlenium.core.domain.FluentWebElement, qname: org.fluentlenium.core.domain.FluentWebElement}684 - {key: org.fluentlenium.core.filter.FilterConstructor, qname: org.fluentlenium.core.filter.FilterConstructor}685 - {key: org.fluentlenium.core.Fluent, qname: org.fluentlenium.core.Fluent}686 - {key: org.fluentlenium.core.FluentPage, qname: org.fluentlenium.core.FluentPage}...

Full Screen

Full Screen

report.js

Source:report.js Github

copy

Full Screen

1$(document).ready(function() {var formatter = new CucumberHTML.DOMFormatter($('.cucumber-report'));formatter.uri("features/smallcaseAssignment.feature");2formatter.feature({3 "name": "Two compare price offered for product in two different shopping sites i.e. Flipkart.com and Amazon.com",4 "description": "",5 "keyword": "Feature"6});7formatter.scenario({8 "name": "Open Flipkart.com and Amazon.in and compare the the price of an product",9 "description": "",10 "keyword": "Scenario"11});12formatter.before({13 "status": "passed"14});15formatter.step({16 "name": "Launch the chrome browser in mobile",17 "keyword": "Given "18});19formatter.match({20 "location": "ComparePriceSteps.launch_the_chrome_browser_in_mobile()"21});22formatter.result({23 "status": "passed"24});25formatter.step({26 "name": "open Flipkart site from search box",27 "keyword": "When "28});29formatter.match({30 "location": "ComparePriceSteps.open_flipkat_com_from_search_box(String)"31});32formatter.result({33 "status": "passed"34});35formatter.step({36 "name": "search for the product VU TV in flipkart.com",37 "keyword": "And "38});39formatter.match({40 "location": "ComparePriceSteps.search_for_the_product_vu_tv()"41});42formatter.result({43 "status": "passed"44});45formatter.step({46 "name": "note the price and product name",47 "keyword": "And "48});49formatter.match({50 "location": "ComparePriceSteps.noteThePriceAndProductName()"51});52formatter.result({53 "status": "passed"54});55formatter.step({56 "name": "open Amazon site from search box",57 "keyword": "And "58});59formatter.match({60 "location": "ComparePriceSteps.open_flipkat_com_from_search_box(String)"61});62formatter.result({63 "status": "passed"64});65formatter.step({66 "name": "search for the product VU TV in amazon.com",67 "keyword": "And "68});69formatter.match({70 "location": "ComparePriceSteps.searchForTheProductVUTVInAmazonCom()"71});72formatter.result({73 "error_message": "org.openqa.selenium.WebDriverException: Returned value cannot be converted to WebElement: {message\u003dunknown error: unknown sessionId\n (Session info: chrome\u003d84.0.4147.125)\n (Driver info: chromedriver\u003d2.37.544337 (8c0344a12e552148c185f7d5117db1f28d6c9e85),platform\u003dMac OS X 10.15.2 x86_64)}\nBuild info: version: \u00273.141.59\u0027, revision: \u0027e82be7d358\u0027, time: \u00272018-11-14T08:17:03\u0027\nSystem info: host: \u0027PasannaD-MBA\u0027, ip: \u0027fe80:0:0:0:c0f:64a5:424d:9c9d%en0\u0027, os.name: \u0027Mac OS X\u0027, os.arch: \u0027x86_64\u0027, os.version: \u002710.15.2\u0027, java.version: \u00271.8.0_181\u0027\nDriver info: driver.version: AndroidDriver\n\tat org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:333)\n\tat io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:61)\n\tat io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)\n\tat io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)\n\tat org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:372)\n\tat io.appium.java_client.DefaultGenericMobileDriver.findElementById(DefaultGenericMobileDriver.java:69)\n\tat io.appium.java_client.AppiumDriver.findElementById(AppiumDriver.java:1)\n\tat io.appium.java_client.android.AndroidDriver.findElementById(AndroidDriver.java:1)\n\tat org.openqa.selenium.By$ById.findElement(By.java:188)\n\tat org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)\n\tat io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:57)\n\tat io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)\n\tat io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)\n\tat com.sc.pages.AmazonObjects.searchForTheProduct(AmazonObjects.java:29)\n\tat com.sc.stepDef.ComparePriceSteps.searchForTheProductVUTVInAmazonCom(ComparePriceSteps.java:53)\n\tat ✽.search for the product VU TV in amazon.com(features/smallcaseAssignment.feature:11)\nCaused by: java.lang.ClassCastException: com.google.common.collect.Maps$TransformedEntriesMap cannot be cast to org.openqa.selenium.WebElement\n\tat org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:331)\n\tat io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:61)\n\tat io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)\n\tat io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)\n\tat org.openqa.selenium.remote.RemoteWebDriver.findElementById(RemoteWebDriver.java:372)\n\tat io.appium.java_client.DefaultGenericMobileDriver.findElementById(DefaultGenericMobileDriver.java:69)\n\tat io.appium.java_client.AppiumDriver.findElementById(AppiumDriver.java:1)\n\tat io.appium.java_client.android.AndroidDriver.findElementById(AndroidDriver.java:1)\n\tat org.openqa.selenium.By$ById.findElement(By.java:188)\n\tat org.openqa.selenium.remote.RemoteWebDriver.findElement(RemoteWebDriver.java:315)\n\tat io.appium.java_client.DefaultGenericMobileDriver.findElement(DefaultGenericMobileDriver.java:57)\n\tat io.appium.java_client.AppiumDriver.findElement(AppiumDriver.java:1)\n\tat io.appium.java_client.android.AndroidDriver.findElement(AndroidDriver.java:1)\n\tat com.sc.pages.AmazonObjects.searchForTheProduct(AmazonObjects.java:29)\n\tat com.sc.stepDef.ComparePriceSteps.searchForTheProductVUTVInAmazonCom(ComparePriceSteps.java:53)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)\n\tat sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)\n\tat sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)\n\tat java.lang.reflect.Method.invoke(Method.java:498)\n\tat cucumber.runtime.Utils$1.call(Utils.java:40)\n\tat cucumber.runtime.Timeout.timeout(Timeout.java:16)\n\tat cucumber.runtime.Utils.invoke(Utils.java:34)\n\tat cucumber.runtime.java.JavaStepDefinition.execute(JavaStepDefinition.java:37)\n\tat cucumber.runtime.StepDefinitionMatch.runStep(StepDefinitionMatch.java:40)\n\tat cucumber.api.TestStep.executeStep(TestStep.java:78)\n\tat cucumber.api.TestStep.run(TestStep.java:61)\n\tat cucumber.api.TestCase.run(TestCase.java:28)\n\tat cucumber.runner.Runner.runPickle(Runner.java:80)\n\tat cucumber.runtime.junit.PickleRunners$NoStepDescriptions.run(PickleRunners.java:140)\n\tat cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:68)\n\tat cucumber.runtime.junit.FeatureRunner.runChild(FeatureRunner.java:23)\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\n\tat cucumber.runtime.junit.FeatureRunner.run(FeatureRunner.java:73)\n\tat cucumber.api.junit.Cucumber.runChild(Cucumber.java:99)\n\tat cucumber.api.junit.Cucumber.runChild(Cucumber.java:41)\n\tat org.junit.runners.ParentRunner$3.run(ParentRunner.java:290)\n\tat org.junit.runners.ParentRunner$1.schedule(ParentRunner.java:71)\n\tat org.junit.runners.ParentRunner.runChildren(ParentRunner.java:288)\n\tat org.junit.runners.ParentRunner.access$000(ParentRunner.java:58)\n\tat org.junit.runners.ParentRunner$2.evaluate(ParentRunner.java:268)\n\tat cucumber.api.junit.Cucumber$1.evaluate(Cucumber.java:108)\n\tat org.junit.runners.ParentRunner.run(ParentRunner.java:363)\n\tat org.junit.runner.JUnitCore.run(JUnitCore.java:137)\n\tat com.intellij.junit4.JUnit4IdeaTestRunner.startRunnerWithArgs(JUnit4IdeaTestRunner.java:68)\n\tat com.intellij.rt.execution.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:47)\n\tat com.intellij.rt.execution.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:242)\n\tat com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:70)\n",74 "status": "failed"75});76formatter.step({77 "name": "check for the price and product name",78 "keyword": "And "79});80formatter.match({81 "location": "ComparePriceSteps.checkForThePriceAndProductName()"82});83formatter.result({84 "status": "skipped"85});86formatter.step({87 "name": "Compare the Price between two different sites for same product",88 "keyword": "Then "89});90formatter.match({91 "location": "ComparePriceSteps.compareThePriceBetweenTwoDifferentSitesForSameProduct()"92});93formatter.result({94 "status": "skipped"95});96formatter.after({97 "status": "passed"98});...

Full Screen

Full Screen

base_page.js

Source:base_page.js Github

copy

Full Screen

1// here we initialize webdriver and other common elements2import webdriver from 'selenium-webdriver';3import { By } from 'selenium-webdriver';4// set up our driver5class BasePage {6 constructor(browser) {7 // this allow us to share our driver8 if (browser === 'chrome') {9 var driver = new webdriver.Builder()10 .withCapabilities(webdriver.Capabilities.chrome())11 .build();12 }13 if (browser === 'firefox') {14 var driver = new webdriver.Builder()15 .withCapabilities(webdriver.Capabilities.firefox())16 .build();17 }18 this.driver = driver;19 }20 findElementById(element) {21 this.driver.findElement(element);22 }23 typeTextOnElement(element, text) {24 this.driver.findElement(By.css(element)).sendKeys(text);25 }26 goToPage(url) {27 this.driver.get(url);28 }29 closeSession() {30 this.driver.quit();31 }32}33// finally we can export our class...

Full Screen

Full Screen

LoginStepDefinitions.js

Source:LoginStepDefinitions.js Github

copy

Full Screen

1import { When, Then, After,Given } from '@cucumber';2import assert from 'assert';3import {Builder} from 'selenium-webdriver';4Given('realizo login na Smarttbot', async function () {5 this.driver = new Builder()6 .forBrowser('chrome')7 .setChromeOptions('disable-infobars')8 .build();9 this.driver.get('https://app.smarttbot.com/public/login');10 await this.driver.findElementById("login-username").sendkeys("rodrigoluisluzmiguel@gmail.com");11 await this.driver.findElementById("login-password").sendkeys("Rllm25478963@123");12 await this.driver.findElementById("login-button").click();13});14When('Clico em "estratégia" no menu lateral', async function(){15 await this.driver.findElementById("sidebar-menu-item-scoreboard").click();16});17After(async function() {18 this.driver.close();...

Full Screen

Full Screen

Using AI Code Generation

copy

Full Screen

1var webdriver = require('selenium-webdriver');2 build();3driver.findElement(webdriver.By.name('q')).sendKeys('webdriver');4driver.findElement(webdriver.By.name('btnG')).click();5driver.wait(function() {6 return driver.getTitle().then(function(title) {7 return title === 'webdriver - Google Search';8 });9}, 1000);10driver.quit();11{12 "scripts": {13 },14 "dependencies": {15 }16}17var webdriver = require('selenium-webdriver');18var By = webdriver.By;19var driver = new webdriver.Builder()20 .forBrowser('chrome')21 .build();22driver.findElement(By.name('q')).sendKeys('webdriver');23driver.findElement(By.name('btnG')).click();24driver.wait(function() {25 return driver.getTitle().then(function(title) {26 return title === 'webdriver - Google Search';27 });28}, 1000);29driver.quit();30var webdriver = require('selenium-webdriver');31var By = webdriver.By;32var until = webdriver.until;33var driver = new webdriver.Builder()34 .forBrowser('chrome')35 .build();36driver.findElement(By.name('q')).sendKeys('webdriver');37driver.findElement(By.name('btnG')).click();38driver.wait(until.titleIs('webdriver - Google Search'), 1000);39driver.quit();40var webdriver = require('selenium-webdriver');41var By = webdriver.By;42var until = webdriver.until;43var driver = new webdriver.Builder()44 .forBrowser('chrome')45 .build();

Full Screen

Using AI Code Generation

copy

Full Screen

1driver.findElementById("com.android.calculator2:id/digit_5").click();2driver.findElementById("com.android.calculator2:id/op_add").click();3driver.findElementById("com.android.calculator2:id/digit_9").click();4driver.findElementById("com.android.calculator2:id/eq").click();5driver.findElementById("com.android.calculator2:id/result").click();6driver.findElementById("com.android.calculator2:id/result").getText().then(function(text) {7assert.equal(text, "14");8});9driver.quit();10}11}

Full Screen

Using AI Code Generation

copy

Full Screen

1var webdriver = require('selenium-webdriver'),2 until = webdriver.until;3var driver = new webdriver.Builder()4 .forBrowser('chrome')5 .build();6driver.findElement(By.name('q')).sendKeys('webdriver');7driver.findElement(By.name('btnG')).click();8driver.wait(until.titleIs('webdriver - Google Search'), 1000);9driver.quit();10var webdriver = require('selenium-webdriver'),11 until = webdriver.until;12var driver = new webdriver.Builder()13 .forBrowser('chrome')14 .build();15driver.findElement(By.id('lst-ib')).sendKeys('webdriver');16driver.findElement(By.name('btnG')).click();17driver.wait(until.titleIs('webdriver - Google Search'), 1000);18driver.quit();19var webdriver = require('selenium-webdriver'),20 until = webdriver.until;21var driver = new webdriver.Builder()22 .forBrowser('chrome')23 .build();24driver.findElement(By.className('gsfi')).sendKeys('webdriver');25driver.findElement(By.name('btnG')).click();26driver.wait(until.titleIs('webdriver - Google Search'), 1000);27driver.quit();28var webdriver = require('selenium-webdriver'),29 until = webdriver.until;30var driver = new webdriver.Builder()31 .forBrowser('chrome')32 .build();33driver.findElement(By.id('lst-ib')).sendKeys('webdriver');34driver.findElement(By.name('btnG')).click();35driver.wait(until.titleIs('webdriver - Google Search'), 1000);36driver.quit();

Full Screen

Using AI Code Generation

copy

Full Screen

1var element = driver.FindElementById("com.example.android.apis:id/button1");2element.Click();3var element = driver.FindElementByName("button1");4element.Click();5element.Click();6var element = driver.FindElementByClassName("android.widget.Button");7element.Click();8var element = driver.FindElementByTagName("button");9element.Click();10var element = driver.FindElementByLinkText("button1");11element.Click();12var element = driver.FindElementByPartialLinkText("button");13element.Click();14var element = driver.FindElementByCssSelector("#button1");15element.Click();16var element = driver.FindElementByAccessibilityId("button1");17element.Click();18var element = driver.FindElementByAndroidUIAutomator("new UiSelector().text(\"button1\")");19element.Click();20var element = driver.FindElementByIosUIAutomation(".elements().withName(\"button1\")");21element.Click();22var element = driver.FindElementByWindowsUIAutomation("new UiSelector().text(\"button1\")");23element.Click();

Full Screen

Automation Testing Tutorials

Learn to execute automation testing from scratch with LambdaTest Learning Hub. Right from setting up the prerequisites to run your first automation test, to following best practices and diving deeper into advanced test scenarios. LambdaTest Learning Hubs compile a list of step-by-step guides to help you be proficient with different test automation frameworks i.e. Selenium, Cypress, TestNG etc.

LambdaTest Learning Hubs:

YouTube

You could also refer to video tutorials over LambdaTest YouTube channel to get step by step demonstration from industry experts.

Run Appium automation tests on LambdaTest cloud grid

Perform automation testing on 3000+ real desktop and mobile devices online.

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful