This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| 11:39:11.172 INFO - Executing: [new session: {platform=ANY, browserName=opera, version=}] at URL: /session) | |
| 11:39:11.172 INFO - Executing: [new session: {platform=ANY, browserName=opera, version=}] at URL: /session) | |
| 11:39:14.275 ERROR - Error : service: "exec" | |
| commandID: 2 | |
| format: 0 | |
| status: 8 | |
| tag: 9 | |
| payload: "\n\026Service is not enabled" | |
| 11:39:14.277 WARN - Got exception |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| public String getFileSnippet(File f) { | |
| String contents = readFileToString(f); | |
| return contents.substring(0, 20); | |
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Testsuite: org.openqa.selenium.opera.OperaDriverTestSuite | |
| Tests run: 0, Failures: 1, Errors: 0, Time elapsed: 6.764 sec | |
| ------------- Standard Error ----------------- | |
| Ignoring test class: class org.openqa.selenium.AlertsTest: Not implemented in driver yet | |
| Ignoring test class: class org.openqa.selenium.ClearTest: Not implemented in driver yet | |
| Ignoring: class org.openqa.selenium.ClickTest.testCanClickOnALinkThatOverflowsAndFollowIt: Not tested on these browsers. | |
| Ignoring: class org.openqa.selenium.ClickTest.testCanClickOnALinkThatUpdatesAnotherFrame: iPhone: Frame switching is unsupportedOpera: Incorrect runtime retrieved, Android: A bug in emulator JSC egine on 2.2, works on devices. | |
| Ignoring: class org.openqa.selenium.ClickTest.testElementsFoundByJsCanLoadUpdatesInAnotherFrame: iPhone: Frame switching is unsupportedOpera: Incorrect runtime retrieved, Android: fails when running with other tests. | |
| Ignoring: class org.openqa.selenium.ClickTest.testJsLoactedElementsCanUpdateFramesIfFoundSomehowElse: iPhone: Frame |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Letting webdriver.promise.Application synchronize everything for you. | |
| // Each line queues a task for execution. | |
| // This is easy to read, not so easy to debug :( | |
| var driver = new webdriver.Builder().build(); | |
| driver.get('http://www.google.com'); | |
| driver.findElement(By.name('q')).sendKeys('webdriver'); | |
| driver.findElement(By.name('btnG')).click(); | |
| assertThat(driver.getTitle(), equals('webdriver - Google Search')); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| /* | |
| DISCLAIMER: I've not used phantomjs or ghost driver, so I'm not familiar with the APIs. | |
| */ | |
| // Assumes this is the //javascript/webdriver/atoms/inject:find_element fragment. It is | |
| // an anonymous function ready for injection into the page. | |
| var findElement = require('./webdriver_atoms.js').get('findElement'); | |
| // Inject findElement into the page. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #This is the addition to $/javascript/webdriver/atoms/build.desc to build the compiled JavaScript | |
| js_fragment(name = "sendKeys", | |
| module = "webdriver.atoms.inputs", | |
| function = "webdriver.atoms.inputs.sendKeys", | |
| deps = [ ":deps" ]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // Copy and paste this into the console for http://www.google.com | |
| // Generated from //javascript/webdriver/atoms/inject:find_element | |
| var findElement = function(){return function(){function i(a){throw a;}var j=void 0,k=!0,l=null,m=!1,n=this; | |
| function o(a){var b=typeof a;if("object"==b)if(a){if(a instanceof Array)return"array";if(a instanceof Object)return b;var c=Object.prototype.toString.call(a);if("[object Window]"==c)return"object";if("[object Array]"==c||"number"==typeof a.length&&"undefined"!=typeof a.splice&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("splice"))return"array";if("[object Function]"==c||"undefined"!=typeof a.call&&"undefined"!=typeof a.propertyIsEnumerable&&!a.propertyIsEnumerable("call"))return"function"}else return"null"; | |
| else if("function"==b&&"undefined"==typeof a.call)return"object";return b}function aa(a){var b=o(a);return"array"==b||"object"==b&&"number"==typeof a.length}function q(a){return"string"==typeof a}function r(a){return"function"==o(a)}function |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| // copy+paste isDisplayed definition into console | |
| var e = document.querySelector('input[name=username]') | |
| isDisplayed(e); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| ChromeOptions options = new ChromeOptions(); | |
| options.addArguments("user-agent=foo;bar"); | |
| WebDriver driver = new ChromeDriver(options); | |
| driver.get("http://www.google.com"); | |
| String userAgent = ((JavascriptExecutor) driver).executeScript("return window.navigator.userAgent"); | |
| System.out.println(userAgent); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| webdriver.atoms.inject.dom.getText = function(element, opt_window) { | |
| var response; | |
| try { | |
| var targetWindow = webdriver.atoms.inject.getWindow(opt_window); | |
| var domEl = /** @type {!Element} */ (bot.inject.cache.getElement( | |
| element[bot.inject.ELEMENT_KEY], targetWindow.document)); | |
| var text = bot.dom.getVisibleText(domEl); | |
| response = bot.inject.wrapResponse(text); | |
| } catch (ex) { | |
| response = bot.inject.wrapError(ex); |
OlderNewer