How to use property method of Selenium.WebDriver Package

Best Selenium code snippet using Selenium.WebDriver.property

selenium-webdriver@4.1.0.rbi

Source:selenium-webdriver@4.1.0.rbi Github

copy

Full Screen

...1039 # @return [Element] a new instance of Element1040 def initialize(bridge, id); end1041 def ==(other); end1042 # This method attempts to provide the most likely desired current value for the attribute1043 # of the element, even when that desired value is actually a JavaScript property.1044 # It is implemented with a custom JavaScript atom. To obtain the exact value of the attribute or property,1045 # use #dom_attribute or #property methods respectively.1046 #1047 # More exactly, this method will return the value of the property with the given name,1048 # if it exists. If it does not, then the value of the attribute with the given name is returned.1049 # If neither exists, null is returned.1050 #1051 # The "style" attribute is converted as best can be to a text representation with a trailing semi-colon.1052 #1053 # The following are deemed to be "boolean" attributes, and will return either "true" or "false":1054 #1055 # async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked,1056 # defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate,1057 # iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate,1058 # nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking,1059 # selected, spellcheck, truespeed, willvalidate1060 #1061 # Finally, the following commonly mis-capitalized attribute/property names are evaluated as expected:1062 #1063 # When the value of "class" is requested, the "className" property is returned.1064 # When the value of "readonly" is requested, the "readOnly" property is returned.1065 #1066 # @param name [String] attribute name1067 # @return [String, nil] attribute value1068 # @see #dom_attribute1069 # @see #property element['class'] or element[:class] #=> "someclass"1070 def [](name); end1071 # Gets the computed WAI-ARIA label of element.1072 #1073 # @return [String]1074 def accessible_name; end1075 # element.all(class: 'bar')1076 def all(*args); end1077 # Gets the computed WAI-ARIA role of element1078 #1079 # @return [String]1080 def aria_role; end1081 # For Rails 3 - http://jonathanjulian.com/2010/04/rails-to_json-or-as_json/1082 #1083 # @api private1084 def as_json(*_arg0); end1085 # This method attempts to provide the most likely desired current value for the attribute1086 # of the element, even when that desired value is actually a JavaScript property.1087 # It is implemented with a custom JavaScript atom. To obtain the exact value of the attribute or property,1088 # use #dom_attribute or #property methods respectively.1089 #1090 # More exactly, this method will return the value of the property with the given name,1091 # if it exists. If it does not, then the value of the attribute with the given name is returned.1092 # If neither exists, null is returned.1093 #1094 # The "style" attribute is converted as best can be to a text representation with a trailing semi-colon.1095 #1096 # The following are deemed to be "boolean" attributes, and will return either "true" or "false":1097 #1098 # async, autofocus, autoplay, checked, compact, complete, controls, declare, defaultchecked,1099 # defaultselected, defer, disabled, draggable, ended, formnovalidate, hidden, indeterminate,1100 # iscontenteditable, ismap, itemscope, loop, multiple, muted, nohref, noresize, noshade, novalidate,1101 # nowrap, open, paused, pubdate, readonly, required, reversed, scoped, seamless, seeking,1102 # selected, spellcheck, truespeed, willvalidate1103 #1104 # Finally, the following commonly mis-capitalized attribute/property names are evaluated as expected:1105 #1106 # When the value of "class" is requested, the "className" property is returned.1107 # When the value of "readonly" is requested, the "readOnly" property is returned.1108 #1109 # @param name [String] attribute name1110 # @return [String, nil] attribute value1111 # @see #dom_attribute1112 # @see #property1113 def attribute(name); end1114 # If this element is a text entry element, this will clear the value. Has no effect on other1115 # elements. Text entry elements are INPUT and TEXTAREA elements.1116 #1117 # Note that the events fired by this event may not be as you'd expect. In particular, we don't1118 # fire any keyboard or mouse events. If you want to ensure keyboard events are1119 # fired, consider using #send_keys with the backspace key. To ensure you get a change event,1120 # consider following with a call to #send_keys with the tab key.1121 def clear; end1122 # Click this element. If this causes a new page to load, this method will1123 # attempt to block until the page has loaded. At this point, you should1124 # discard all references to this element and any further operations1125 # performed on this element will raise a StaleElementReferenceError1126 # unless you know that the element and the page will still be present. If1127 # click() causes a new page to be loaded via an event or is done by1128 # sending a native event then the method will *not* wait for it to be1129 # loaded and the caller should verify that a new page has been loaded.1130 #1131 # There are some preconditions for an element to be clicked. The element1132 # must be visible and it must have a height and width greater then 0.1133 #1134 # Equivalent to:1135 # driver.action.click(element)1136 #1137 # @example Click on a button1138 #1139 # driver.find_element(tag_name: "button").click1140 # @raise [StaleElementReferenceError] if the element no longer exists as1141 # defined1142 def click; end1143 # Get the value of the given CSS property1144 #1145 # Note that shorthand CSS properties (e.g. background, font, border, border-top, margin,1146 # margin-top, padding, padding-top, list-style, outline, pause, cue) are not returned,1147 # in accordance with the DOM CSS2 specification - you should directly access the longhand1148 # properties (e.g. background-color) to access the desired values.1149 #1150 # @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration1151 def css_value(prop); end1152 # Is the element displayed?1153 #1154 # @return [Boolean]1155 def displayed?; end1156 # Gets the value of a declared HTML attribute of this element.1157 #1158 # As opposed to the #attribute method, this method1159 # only returns attributes declared in the element's HTML markup.1160 #1161 # If the attribute is not set, nil is returned.1162 #1163 # @param name [String] attribute name1164 # @return [String, nil] attribute value1165 # @see #attribute1166 # @see #property1167 def dom_attribute(name); end1168 # Is the element enabled?1169 #1170 # @return [Boolean]1171 def enabled?; end1172 def eql?(other); end1173 # element.first(id: 'foo')1174 def first(*args); end1175 def hash; end1176 def inspect; end1177 # Get the location of this element.1178 #1179 # @return [WebDriver::Point]1180 def location; end1181 # Determine an element's location on the screen once it has been scrolled into view.1182 #1183 # @return [WebDriver::Point]1184 def location_once_scrolled_into_view; end1185 # Gets the value of a JavaScript property of this element1186 # This will return the current value,1187 # even if this has been modified after the page has been loaded.1188 # If the value is not set, nil is returned.1189 #1190 # @param name [String] property name1191 # @return [String, nil] property value1192 def property(name); end1193 # Get the dimensions and coordinates of this element.1194 #1195 # @return [WebDriver::Rectangle]1196 def rect; end1197 # @api private1198 # @see SearchContext1199 def ref; end1200 # Is the element selected?1201 #1202 # @return [Boolean]1203 def selected?; end1204 # Send keystrokes to this element1205 #1206 # Examples:1207 #1208 # element.send_keys "foo" #=> value: 'foo'1209 # element.send_keys "tet", :arrow_left, "s" #=> value: 'test'1210 # element.send_keys [:control, 'a'], :space #=> value: ' '1211 #1212 # @param args [String, Symbol, Array] keystrokes to send1213 # @see Keys::KEYS1214 def send_key(*args); end1215 # Send keystrokes to this element1216 #1217 # Examples:1218 #1219 # element.send_keys "foo" #=> value: 'foo'1220 # element.send_keys "tet", :arrow_left, "s" #=> value: 'test'1221 # element.send_keys [:control, 'a'], :space #=> value: ' '1222 #1223 # @param args [String, Symbol, Array] keystrokes to send1224 # @see Keys::KEYS1225 def send_keys(*args); end1226 # Returns the shadow root of an element.1227 #1228 # @return [WebDriver::ShadowRoot]1229 def shadow_root; end1230 # Get the size of this element1231 #1232 # @return [WebDriver::Dimension]1233 def size; end1234 # Get the value of the given CSS property1235 #1236 # Note that shorthand CSS properties (e.g. background, font, border, border-top, margin,1237 # margin-top, padding, padding-top, list-style, outline, pause, cue) are not returned,1238 # in accordance with the DOM CSS2 specification - you should directly access the longhand1239 # properties (e.g. background-color) to access the desired values.1240 #1241 # @see http://www.w3.org/TR/DOM-Level-2-Style/css.html#CSS-CSSStyleDeclaration1242 def style(prop); end1243 # Submit this element1244 def submit; end1245 # Get the tag name of the element.1246 #1247 # @example Get the tagname of an INPUT element(returns "input")1248 #1249 # driver.find_element(xpath: "//input").tag_name1250 # @return [String] The tag name of this element.1251 def tag_name; end1252 # Get the text content of this element1253 #1254 # @return [String]1255 def text; end1256 # Convert to a WebElement JSON Object for transmission over the wire.1257 #1258 # @api private1259 # @see https://github.com/SeleniumHQ/selenium/wiki/JsonWireProtocol#basic-terms-and-concepts1260 def to_json(*_arg0); end1261 private1262 # Returns the value of attribute bridge.1263 def bridge; end1264 def screenshot; end1265 # @return [Boolean]1266 def selectable?; end1267end1268Selenium::WebDriver::Element::ELEMENT_KEY = T.let(T.unsafe(nil), String)1269module Selenium::WebDriver::Error1270 class << self1271 # Returns exception from its string representation.1272 #1273 # @param error [String, nil]1274 def for_error(error); end1275 end1276end1277# A command failed because the referenced shadow root is no longer attached to the DOM.1278class Selenium::WebDriver::Error::DetachedShadowRootError < ::Selenium::WebDriver::Error::WebDriverError; end1279# The Element Click command could not be completed because the element receiving the events1280# is obscuring the element that was requested clicked.1281class Selenium::WebDriver::Error::ElementClickInterceptedError < ::Selenium::WebDriver::Error::WebDriverError; end1282# A command could not be completed because the element is not pointer or keyboard1283# interactable.1284class Selenium::WebDriver::Error::ElementNotInteractableError < ::Selenium::WebDriver::Error::WebDriverError; end1285# A command could not be completed because TLS certificate is expired1286# or invalid.1287class Selenium::WebDriver::Error::InsecureCertificateError < ::Selenium::WebDriver::Error::WebDriverError; end1288# The arguments passed to a command are either invalid or malformed.1289class Selenium::WebDriver::Error::InvalidArgumentError < ::Selenium::WebDriver::Error::WebDriverError; end1290# An illegal attempt was made to set a cookie under a different domain than the current page.1291class Selenium::WebDriver::Error::InvalidCookieDomainError < ::Selenium::WebDriver::Error::WebDriverError; end1292# The target element is in an invalid state, rendering it impossible to interact with, for1293# example if you click a disabled element.1294class Selenium::WebDriver::Error::InvalidElementStateError < ::Selenium::WebDriver::Error::WebDriverError; end1295# Argument was an invalid selector.1296class Selenium::WebDriver::Error::InvalidSelectorError < ::Selenium::WebDriver::Error::WebDriverError; end1297# Occurs if the given session id is not in the list of active sessions, meaning the session1298# either does not exist or that it's not active.1299class Selenium::WebDriver::Error::InvalidSessionIdError < ::Selenium::WebDriver::Error::WebDriverError; end1300# An error occurred while executing JavaScript supplied by the user.1301class Selenium::WebDriver::Error::JavascriptError < ::Selenium::WebDriver::Error::WebDriverError; end1302# The target for mouse interaction is not in the browser's viewport and cannot be brought1303# into that viewport.1304class Selenium::WebDriver::Error::MoveTargetOutOfBoundsError < ::Selenium::WebDriver::Error::WebDriverError; end1305# An attempt was made to operate on a modal dialog when one was not open:1306class Selenium::WebDriver::Error::NoSuchAlertError < ::Selenium::WebDriver::Error::WebDriverError; end1307# No cookie matching the given path name was found amongst the associated cookies of the1308# current browsing context's active document.1309class Selenium::WebDriver::Error::NoSuchCookieError < ::Selenium::WebDriver::Error::WebDriverError; end1310# An element could not be located on the page using the given search parameters.1311class Selenium::WebDriver::Error::NoSuchElementError < ::Selenium::WebDriver::Error::WebDriverError; end1312# A command to switch to a frame could not be satisfied because the frame could not be found.1313class Selenium::WebDriver::Error::NoSuchFrameError < ::Selenium::WebDriver::Error::WebDriverError; end1314# The element does not have a shadow root.1315class Selenium::WebDriver::Error::NoSuchShadowRootError < ::Selenium::WebDriver::Error::WebDriverError; end1316# A command to switch to a window could not be satisfied because1317# the window could not be found.1318class Selenium::WebDriver::Error::NoSuchWindowError < ::Selenium::WebDriver::Error::WebDriverError; end1319# A script did not complete before its timeout expired.1320class Selenium::WebDriver::Error::ScriptTimeoutError < ::Selenium::WebDriver::Error::WebDriverError; end1321class Selenium::WebDriver::Error::ServerError < ::StandardError1322 # @return [ServerError] a new instance of ServerError1323 def initialize(response); end1324end1325# A new session could not be created.1326class Selenium::WebDriver::Error::SessionNotCreatedError < ::Selenium::WebDriver::Error::WebDriverError; end1327# A command failed because the referenced element is no longer attached to the DOM.1328class Selenium::WebDriver::Error::StaleElementReferenceError < ::Selenium::WebDriver::Error::WebDriverError; end1329# An operation did not complete before its timeout expired.1330class Selenium::WebDriver::Error::TimeoutError < ::Selenium::WebDriver::Error::WebDriverError; end1331# A screen capture was made impossible.1332class Selenium::WebDriver::Error::UnableToCaptureScreenError < ::Selenium::WebDriver::Error::WebDriverError; end1333# A command to set a cookie's value could not be satisfied.1334class Selenium::WebDriver::Error::UnableToSetCookieError < ::Selenium::WebDriver::Error::WebDriverError; end1335# A modal dialog was open, blocking this operation.1336class Selenium::WebDriver::Error::UnexpectedAlertOpenError < ::Selenium::WebDriver::Error::WebDriverError; end1337# A command could not be executed because the remote end is not aware of it.1338class Selenium::WebDriver::Error::UnknownCommandError < ::Selenium::WebDriver::Error::WebDriverError; end1339# An unknown error occurred in the remote end while processing the command.1340class Selenium::WebDriver::Error::UnknownError < ::Selenium::WebDriver::Error::WebDriverError; end1341# The requested command matched a known URL but did not match an method for that URL.1342class Selenium::WebDriver::Error::UnknownMethodError < ::Selenium::WebDriver::Error::WebDriverError; end1343# Indicates that a command that should have executed properly cannot be supported for some1344# reason.1345class Selenium::WebDriver::Error::UnsupportedOperationError < ::Selenium::WebDriver::Error::WebDriverError; end1346class Selenium::WebDriver::Error::WebDriverError < ::StandardError; end1347# @api private1348module Selenium::WebDriver::FileReaper1349 class << self1350 # @api private1351 def <<(file); end1352 # @api private1353 # @raise [Error::WebDriverError]1354 def reap(file); end1355 # @api private1356 def reap!; end1357 # @api private1358 def reap=(_arg0); end1359 # @api private1360 # @return [Boolean]1361 def reap?; end1362 # @api private1363 def tmp_files; end1364 end1365end1366module Selenium::WebDriver::Firefox1367 class << self1368 def driver_path; end1369 def driver_path=(path); end1370 def path; end1371 def path=(path); end1372 end1373end1374Selenium::WebDriver::Firefox::DEFAULT_ASSUME_UNTRUSTED_ISSUER = T.let(T.unsafe(nil), TrueClass)1375Selenium::WebDriver::Firefox::DEFAULT_PORT = T.let(T.unsafe(nil), Integer)1376# Mozilla Automation Team asked to only support 851377# until WebDriver Bidi is available.1378Selenium::WebDriver::Firefox::DEVTOOLS_VERSION = T.let(T.unsafe(nil), Integer)1379# Driver implementation for Firefox using GeckoDriver.1380#1381# @api private1382class Selenium::WebDriver::Firefox::Driver < ::Selenium::WebDriver::Driver1383 # @api private1384 def browser; end1385 private1386 # @api private1387 def devtools_url; end1388 # @api private1389 def devtools_version; end1390end1391# @api private1392Selenium::WebDriver::Firefox::Driver::EXTENSIONS = T.let(T.unsafe(nil), Array)1393# @api private1394class Selenium::WebDriver::Firefox::Extension1395 # @api private1396 # @raise [Error::WebDriverError]1397 # @return [Extension] a new instance of Extension1398 def initialize(path); end1399 # @api private1400 def write_to(extensions_dir); end1401 private1402 # @api private1403 def applications_gecko_id(manifest); end1404 # @api private1405 def create_root; end1406 # @api private1407 def name_and_version(manifest); end1408 # @api private1409 def read_id(directory); end1410 # @api private1411 # @raise [Error::WebDriverError]1412 def read_id_from_install_rdf(directory); end1413 # @api private1414 def read_id_from_manifest_json(directory); end1415end1416# @api private1417Selenium::WebDriver::Firefox::Extension::NAMESPACE = T.let(T.unsafe(nil), String)1418module Selenium::WebDriver::Firefox::Features1419 def commands(command); end1420 def context; end1421 def context=(context); end1422 def full_screenshot; end1423 def install_addon(path, temporary); end1424 def uninstall_addon(id); end1425end1426Selenium::WebDriver::Firefox::Features::FIREFOX_COMMANDS = T.let(T.unsafe(nil), Hash)1427class Selenium::WebDriver::Firefox::Options < ::Selenium::WebDriver::Options1428 # Create a new Options instance, only for W3C-capable versions of Firefox.1429 #1430 # @example1431 # options = Selenium::WebDriver::Firefox::Options.new(args: ['--host=127.0.0.1'])1432 # driver = Selenium::WebDriver.for :firefox, capabilities: options1433 # @option opts1434 # @option opts1435 # @option opts1436 # @option opts1437 # @option opts1438 # @option opts1439 # @param opts [Hash] the pre-defined options to create the Firefox::Options with1440 # @return [Options] a new instance of Options1441 def initialize(log_level: T.unsafe(nil), **opts); end1442 # Add a command-line argument to use when starting Firefox.1443 #1444 # @example Start geckodriver on a specific host1445 # options = Selenium::WebDriver::Firefox::Options.new1446 # options.add_argument('--host=127.0.0.1')1447 # @param arg [String] The command-line argument to add1448 def add_argument(arg); end1449 # Add a preference that is only applied to the user profile in use.1450 #1451 # @example Set the default homepage1452 # options = Selenium::WebDriver::Firefox::Options.new1453 # options.add_preference('browser.startup.homepage', 'http://www.seleniumhq.com/')1454 # @param name [String] Key of the preference1455 # @param value [Boolean, String, Integer] Value of the preference1456 def add_preference(name, value); end1457 # Returns the value of attribute debugger_address.1458 def debugger_address; end1459 # Sets the attribute debugger_address1460 #1461 # @param value the value to set the attribute debugger_address to.1462 def debugger_address=(_arg0); end1463 # Enables mobile browser use on Android.1464 #1465 # @param package [String] The package name of the Chrome or WebView app.1466 # @param serial_number [String] The serial number of the device on which to launch the application.1467 # If not specified and multiple devices are attached, an error will be returned.1468 # @param activity [String] The fully qualified class name of the activity to be launched.1469 # @param intent_arguments [Array] Arguments to launch the intent with.1470 # @see https://developer.mozilla.org/en-US/docs/Web/WebDriver/Capabilities/firefoxOptions#android1471 def enable_android(package: T.unsafe(nil), serial_number: T.unsafe(nil), activity: T.unsafe(nil), intent_arguments: T.unsafe(nil)); end1472 # Run Firefox in headless mode.1473 #1474 # @example Enable headless mode1475 # options = Selenium::WebDriver::Firefox::Options.new1476 # options.headless!1477 def headless!; end1478 def log_level; end1479 def log_level=(level); end1480 # NOTE: special handling of 'profile' to validate when set instead of when used1481 def profile; end1482 # Sets Firefox profile.1483 #1484 # @example Set the custom profile1485 # profile = Selenium::WebDriver::Firefox::Profile.new1486 # options = Selenium::WebDriver::Firefox::Options.new1487 # options.profile = profile1488 # @example Use existing profile1489 # options = Selenium::WebDriver::Firefox::Options.new1490 # options.profile = 'myprofile'1491 # @param profile [Profile, String] Profile to be used1492 def profile=(profile); end1493 private1494 # @return [Boolean]1495 def camelize?(key); end1496 def process_browser_options(browser_options); end1497 def process_profile(profile); end1498end1499Selenium::WebDriver::Firefox::Options::BROWSER = T.let(T.unsafe(nil), String)1500# see: https://firefox-source-docs.mozilla.org/testing/geckodriver/Capabilities.html1501Selenium::WebDriver::Firefox::Options::CAPABILITIES = T.let(T.unsafe(nil), Hash)1502Selenium::WebDriver::Firefox::Options::KEY = T.let(T.unsafe(nil), String)1503class Selenium::WebDriver::Firefox::Profile1504 include ::Selenium::WebDriver::ProfileHelper1505 extend ::Selenium::WebDriver::ProfileHelper::ClassMethods1506 # Create a new Profile instance1507 #1508 # @example User configured profile1509 #1510 # profile = Selenium::WebDriver::Firefox::Profile.new1511 # profile['network.proxy.http'] = 'localhost'1512 # profile['network.proxy.http_port'] = 90901513 #1514 # driver = Selenium::WebDriver.for :firefox, :profile => profile1515 # @return [Profile] a new instance of Profile1516 def initialize(model = T.unsafe(nil)); end1517 # Set a preference for this particular profile.1518 #1519 # @see http://kb.mozillazine.org/About:config_entries1520 # @see http://preferential.mozdev.org/preferences.html1521 def []=(key, value); end1522 # Add the extension (directory, .zip or .xpi) at the given path to the profile.1523 def add_extension(path, name = T.unsafe(nil)); end1524 def as_json; end1525 def layout_on_disk; end1526 # Sets the attribute load_no_focus_lib1527 #1528 # @param value the value to set the attribute load_no_focus_lib to.1529 def load_no_focus_lib=(_arg0); end1530 # Returns the value of attribute log_file.1531 def log_file; end1532 def log_file=(file); end1533 # Returns the value of attribute name.1534 def name; end1535 def port=(port); end1536 # @raise [TypeError]1537 def proxy=(proxy); end1538 # Sets the attribute secure_ssl1539 #1540 # @param value the value to set the attribute secure_ssl to.1541 def secure_ssl=(_arg0); end1542 private1543 def delete_extensions_cache(directory); end1544 def delete_lock_files(directory); end1545 def extension_name_for(path); end1546 def install_extensions(directory); end1547 def read_model_prefs; end1548 def read_user_prefs(path); end1549 def set_manual_proxy_preference(key, value); end1550 # @return [Boolean]1551 def stringified?(str); end1552 def update_user_prefs_in(directory); end1553 def write_prefs(prefs, path); end1554 class << self1555 def decoded(json); end1556 # @raise [Error::WebDriverError]1557 def from_name(name); end1558 def ini; end1559 end1560end1561Selenium::WebDriver::Firefox::Profile::DEFAULT_PREFERENCES = T.let(T.unsafe(nil), Hash)1562Selenium::WebDriver::Firefox::Profile::VALID_PREFERENCE_TYPES = T.let(T.unsafe(nil), Array)1563# @api private1564class Selenium::WebDriver::Firefox::ProfilesIni1565 # @api private1566 # @return [ProfilesIni] a new instance of ProfilesIni1567 def initialize; end1568 # @api private1569 def [](name); end1570 # @api private1571 def refresh; end1572 private1573 # @api private1574 def parse; end1575 # @api private1576 def path_for(name, is_relative, path); end1577end1578class Selenium::WebDriver::Firefox::Service < ::Selenium::WebDriver::Service1579 private1580 # NOTE: This processing is deprecated1581 def extract_service_args(driver_opts); end1582end1583Selenium::WebDriver::Firefox::Service::DEFAULT_PORT = T.let(T.unsafe(nil), Integer)1584Selenium::WebDriver::Firefox::Service::EXECUTABLE = T.let(T.unsafe(nil), String)1585Selenium::WebDriver::Firefox::Service::MISSING_TEXT = T.let(T.unsafe(nil), String)1586module Selenium::WebDriver::HTML5; end1587class Selenium::WebDriver::HTML5::LocalStorage1588 include ::Enumerable1589 include ::Selenium::WebDriver::HTML5::SharedWebStorage1590 # @api private1591 # @return [LocalStorage] a new instance of LocalStorage1592 def initialize(bridge); end1593 def [](key); end1594 def []=(key, value); end1595 def clear; end1596 def delete(key); end1597 def keys; end1598 def size; end1599end1600class Selenium::WebDriver::HTML5::SessionStorage1601 include ::Enumerable1602 include ::Selenium::WebDriver::HTML5::SharedWebStorage1603 # @api private1604 # @return [SessionStorage] a new instance of SessionStorage1605 def initialize(bridge); end1606 def [](key); end1607 def []=(key, value); end1608 def clear; end1609 def delete(key); end1610 def keys; end1611 def size; end1612end1613module Selenium::WebDriver::HTML5::SharedWebStorage1614 include ::Enumerable1615 def each; end1616 # @return [Boolean]1617 def empty?; end1618 # @raise [KeyError]1619 def fetch(key); end1620 # @return [Boolean]1621 def has_key?(key); end1622 # @return [Boolean]1623 def key?(key); end1624 # @return [Boolean]1625 def member?(key); end1626end1627module Selenium::WebDriver::IE1628 class << self1629 def driver_path; end1630 def driver_path=(path); end1631 end1632end1633# Driver implementation for Internet Explorer supporting1634# both OSS and W3C dialects of JSON wire protocol.1635#1636# @api private1637class Selenium::WebDriver::IE::Driver < ::Selenium::WebDriver::Driver1638 # @api private1639 def browser; end1640end1641# @api private1642Selenium::WebDriver::IE::Driver::EXTENSIONS = T.let(T.unsafe(nil), Array)1643class Selenium::WebDriver::IE::Options < ::Selenium::WebDriver::Options1644 # Create a new Options instance1645 #1646 # @example1647 # options = Selenium::WebDriver::IE::Options.new(args: ['--host=127.0.0.1'])1648 # driver = Selenium::WebDriver.for(:ie, capabilities: options)1649 # @example1650 # options = Selenium::WebDriver::IE::Options.new1651 # options.element_scroll_behavior = Selenium::WebDriver::IE::Options::SCROLL_BOTTOM1652 # driver = Selenium::WebDriver.for(:ie, capabilities: options)1653 # @option opts1654 # @option opts1655 # @option opts1656 # @option opts1657 # @option opts1658 # @option opts1659 # @option opts1660 # @option opts1661 # @option opts1662 # @option opts1663 # @option opts1664 # @option opts1665 # @option opts1666 # @option opts1667 # @option opts1668 # @option opts1669 # @param opts [Hash] the pre-defined options1670 # @return [Options] a new instance of Options1671 def initialize(**opts); end1672 # Add a command-line argument to use when starting Internet Explorer.1673 #1674 # @param arg [String] The command-line argument to add1675 def add_argument(arg); end1676 # Returns the value of attribute args.1677 def args; end1678 private1679 def process_browser_options(browser_options); end1680end1681Selenium::WebDriver::IE::Options::BROWSER = T.let(T.unsafe(nil), String)1682Selenium::WebDriver::IE::Options::CAPABILITIES = T.let(T.unsafe(nil), Hash)1683Selenium::WebDriver::IE::Options::KEY = T.let(T.unsafe(nil), String)1684Selenium::WebDriver::IE::Options::SCROLL_BOTTOM = T.let(T.unsafe(nil), Integer)1685Selenium::WebDriver::IE::Options::SCROLL_TOP = T.let(T.unsafe(nil), Integer)1686class Selenium::WebDriver::IE::Service < ::Selenium::WebDriver::Service1687 private1688 # NOTE: This processing is deprecated1689 def extract_service_args(driver_opts); end1690end1691Selenium::WebDriver::IE::Service::DEFAULT_PORT = T.let(T.unsafe(nil), Integer)1692Selenium::WebDriver::IE::Service::EXECUTABLE = T.let(T.unsafe(nil), String)1693Selenium::WebDriver::IE::Service::MISSING_TEXT = T.let(T.unsafe(nil), String)1694Selenium::WebDriver::IE::Service::SHUTDOWN_SUPPORTED = T.let(T.unsafe(nil), TrueClass)1695module Selenium::WebDriver::Interactions1696 class << self1697 def key(name); end1698 def none(name = T.unsafe(nil)); end1699 def pointer(kind, **kwargs); end1700 end1701end1702class Selenium::WebDriver::Interactions::InputDevice1703 # @return [InputDevice] a new instance of InputDevice1704 def initialize(name = T.unsafe(nil)); end1705 # Returns the value of attribute actions.1706 def actions; end1707 # @raise [TypeError]1708 def add_action(action); end1709 def clear_actions; end1710 def create_pause(duration = T.unsafe(nil)); end1711 # Returns the value of attribute name.1712 def name; end1713 # Determine if only pauses are present1714 #1715 # @return [Boolean]1716 def no_actions?; end1717end1718class Selenium::WebDriver::Interactions::Interaction1719 # @return [Interaction] a new instance of Interaction1720 def initialize(source); end1721 # Returns the value of attribute source.1722 def source; end1723end1724Selenium::WebDriver::Interactions::Interaction::PAUSE = T.let(T.unsafe(nil), Symbol)1725Selenium::WebDriver::Interactions::KEY = T.let(T.unsafe(nil), Symbol)1726class Selenium::WebDriver::Interactions::KeyInput < ::Selenium::WebDriver::Interactions::InputDevice1727 def create_key_down(key); end1728 def create_key_up(key); end1729 def encode; end1730 def type; end1731end1732Selenium::WebDriver::Interactions::KeyInput::SUBTYPES = T.let(T.unsafe(nil), Hash)1733class Selenium::WebDriver::Interactions::KeyInput::TypingInteraction < ::Selenium::WebDriver::Interactions::Interaction1734 # @return [TypingInteraction] a new instance of TypingInteraction1735 def initialize(source, type, key); end1736 # @raise [TypeError]1737 def assert_type(type); end1738 def encode; end1739 # Returns the value of attribute type.1740 def type; end1741end1742Selenium::WebDriver::Interactions::NONE = T.let(T.unsafe(nil), Symbol)1743class Selenium::WebDriver::Interactions::NoneInput < ::Selenium::WebDriver::Interactions::InputDevice1744 def encode; end1745 def type; end1746end1747Selenium::WebDriver::Interactions::POINTER = T.let(T.unsafe(nil), Symbol)1748class Selenium::WebDriver::Interactions::Pause < ::Selenium::WebDriver::Interactions::Interaction1749 # @return [Pause] a new instance of Pause1750 def initialize(source, duration = T.unsafe(nil)); end1751 def encode; end1752 def type; end1753end1754# Move1755class Selenium::WebDriver::Interactions::PointerCancel < ::Selenium::WebDriver::Interactions::Interaction1756 def encode; end1757 def type; end1758end1759class Selenium::WebDriver::Interactions::PointerInput < ::Selenium::WebDriver::Interactions::InputDevice1760 # @return [PointerInput] a new instance of PointerInput1761 def initialize(kind, name: T.unsafe(nil)); end1762 # @raise [TypeError]1763 def assert_kind(pointer); end1764 def create_pointer_cancel; end1765 def create_pointer_down(button); end1766 def create_pointer_move(duration: T.unsafe(nil), x: T.unsafe(nil), y: T.unsafe(nil), element: T.unsafe(nil), origin: T.unsafe(nil)); end1767 def create_pointer_up(button); end1768 def encode; end1769 # Returns the value of attribute kind.1770 def kind; end1771 def type; end1772end1773Selenium::WebDriver::Interactions::PointerInput::KIND = T.let(T.unsafe(nil), Hash)1774# PointerPress1775class Selenium::WebDriver::Interactions::PointerMove < ::Selenium::WebDriver::Interactions::Interaction1776 # @return [PointerMove] a new instance of PointerMove1777 def initialize(source, duration, x, y, element: T.unsafe(nil), origin: T.unsafe(nil)); end1778 def encode; end1779 def type; end1780end1781Selenium::WebDriver::Interactions::PointerMove::ORIGINS = T.let(T.unsafe(nil), Array)1782Selenium::WebDriver::Interactions::PointerMove::POINTER = T.let(T.unsafe(nil), Symbol)1783Selenium::WebDriver::Interactions::PointerMove::VIEWPORT = T.let(T.unsafe(nil), Symbol)1784# PointerInput1785class Selenium::WebDriver::Interactions::PointerPress < ::Selenium::WebDriver::Interactions::Interaction1786 # @return [PointerPress] a new instance of PointerPress1787 def initialize(source, direction, button); end1788 # @raise [ArgumentError]1789 def assert_button(button); end1790 # @raise [TypeError]1791 def assert_direction(direction); end1792 def encode; end1793 def type; end1794end1795Selenium::WebDriver::Interactions::PointerPress::BUTTONS = T.let(T.unsafe(nil), Hash)1796Selenium::WebDriver::Interactions::PointerPress::DIRECTIONS = T.let(T.unsafe(nil), Hash)1797Selenium::WebDriver::Interactions::SOURCE_TYPES = T.let(T.unsafe(nil), Array)1798module Selenium::WebDriver::KeyActions1799 # Performs a key press. Does not release the key - subsequent interactions may assume it's kept pressed.1800 # Note that the key is never released implicitly - either ActionBuilder#key_up(key) or ActionBuilder#release_actions1801 # must be called to release the key.1802 #1803 # @example Press a key1804 #1805 # driver.action.key_down(:control).perform1806 # @example Press a key on an element1807 #1808 # el = driver.find_element(id: "some_id")1809 # driver.action.key_down(el, :shift).perform1810 # @overload key_down1811 # @overload key_down1812 # @return [ActionBuilder] A self reference1813 def key_down(*args, device: T.unsafe(nil)); end1814 # Performs a key release.1815 # Releasing a non-depressed key will yield undefined behaviour.1816 #1817 # @example Release a key1818 #1819 # driver.action.key_up(:shift).perform1820 # @example Release a key from an element1821 #1822 # el = driver.find_element(id: "some_id")1823 # driver.action.key_up(el, :alt).perform1824 # @overload key_up1825 # @overload key_up1826 # @return [ActionBuilder] A self reference1827 def key_up(*args, device: T.unsafe(nil)); end1828 # Sends keys to the active element. This differs from calling1829 # Element#send_keys(keys) on the active element in two ways:1830 #1831 # * The modifier keys included in this call are not released.1832 # * There is no attempt to re-focus the element - so send_keys(:tab) for switching elements should work.1833 #1834 # @example Send the text "help" to an element1835 #1836 # el = driver.find_element(id: "some_id")1837 # driver.action.send_keys(el, "help").perform1838 # @example Send the text "help" to the currently focused element1839 #1840 # driver.action.send_keys("help").perform1841 # @overload send_keys1842 # @overload send_keys1843 # @return [ActionBuilder] A self reference1844 def send_keys(*args, device: T.unsafe(nil)); end1845 private1846 # @api private1847 # @option args1848 # @option args1849 # @overload key_down1850 # @overload key_down1851 # @param args [Array]1852 # @param action [Symbol] The name of the key action to perform1853 # @param device [Symbol, String] optional name of the KeyInput device to press the key on1854 # @return [ActionBuilder] A self reference1855 def key_action(*args, action: T.unsafe(nil), device: T.unsafe(nil)); end1856end1857module Selenium::WebDriver::Keys1858 class << self1859 # @api private1860 # @raise [Error::UnsupportedOperationError]1861 def [](key); end1862 # @api private1863 def encode(keys); end1864 # @api private1865 def encode_key(key); end1866 end1867end1868# @see Element#send_keys1869# @see http://www.google.com.au/search?&q=unicode+pua&btnK=Search1870Selenium::WebDriver::Keys::KEYS = T.let(T.unsafe(nil), Hash)1871class Selenium::WebDriver::Location < ::Struct1872 # Returns the value of attribute altitude1873 #1874 # @return [Object] the current value of altitude1875 def altitude; end1876 # Sets the attribute altitude1877 #1878 # @param value [Object] the value to set the attribute altitude to.1879 # @return [Object] the newly set value1880 def altitude=(_); end1881 # Returns the value of attribute latitude1882 #1883 # @return [Object] the current value of latitude1884 def latitude; end1885 # Sets the attribute latitude1886 #1887 # @param value [Object] the value to set the attribute latitude to.1888 # @return [Object] the newly set value1889 def latitude=(_); end1890 # Returns the value of attribute longitude1891 #1892 # @return [Object] the current value of longitude1893 def longitude; end1894 # Sets the attribute longitude1895 #1896 # @param value [Object] the value to set the attribute longitude to.1897 # @return [Object] the newly set value1898 def longitude=(_); end1899 class << self1900 def [](*_arg0); end1901 def inspect; end1902 def keyword_init?; end1903 def members; end1904 def new(*_arg0); end1905 end1906end1907class Selenium::WebDriver::LogEntry1908 # @return [LogEntry] a new instance of LogEntry1909 def initialize(level, timestamp, message); end1910 def as_json(*_arg0); end1911 # Returns the value of attribute level.1912 def level; end1913 # Returns the value of attribute message.1914 def message; end1915 def time; end1916 # Returns the value of attribute timestamp.1917 def timestamp; end1918 def to_s; end1919end1920# @example Enable full logging1921# Selenium::WebDriver.logger.level = :debug1922# @example Log to file1923# Selenium::WebDriver.logger.output = 'selenium.log'1924# @example Use logger manually1925# Selenium::WebDriver.logger.info('This is info message')1926# Selenium::WebDriver.logger.warn('This is warning message')1927class Selenium::WebDriver::Logger1928 extend ::Forwardable1929 # @param progname [String] Allow child projects to use Selenium's Logger pattern1930 # @return [Logger] a new instance of Logger1931 def initialize(progname = T.unsafe(nil)); end1932 def close(*args, **_arg1, &block); end1933 def debug(*args, **_arg1, &block); end1934 def debug?(*args, **_arg1, &block); end1935 # Marks code as deprecated with/without replacement.1936 #1937 # @param old [String]1938 # @param new [String, nil]1939 # @param id [Symbol, Array<Symbol>]1940 # @param reference [String]1941 # @yield appends additional message to end of provided template1942 def deprecate(old, new = T.unsafe(nil), id: T.unsafe(nil), reference: T.unsafe(nil), &block); end1943 def error(*args, **_arg1, &block); end1944 def error?(*args, **_arg1, &block); end1945 def fatal(*args, **_arg1, &block); end1946 def fatal?(*args, **_arg1, &block); end1947 # Will not log the provided ID.1948 #1949 # @param id [Array, Symbol]1950 def ignore(id); end1951 def info(*args, **_arg1, &block); end1952 def info?(*args, **_arg1, &block); end1953 # Returns IO object used by logger internally.1954 #1955 # Normally, we would have never needed it, but we want to1956 # use it as IO object for all child processes to ensure their1957 # output is redirected there.1958 #1959 # It is only used in debug level, in other cases output is suppressed.1960 #1961 # @api private1962 def io; end1963 def level(*args, **_arg1, &block); end1964 def level=(*args, **_arg1, &block); end1965 # Changes logger output to a new IO.1966 #1967 # @param io [String]1968 def output=(io); end1969 # Overrides default #warn to skip ignored messages by provided id1970 #1971 # @param message [String]1972 # @param id [Symbol, Array<Sybmol>]1973 # @yield see #deprecate1974 def warn(message, id: T.unsafe(nil)); end1975 def warn?(*args, **_arg1, &block); end1976 private1977 def create_logger(name); end1978 def default_level; end1979end1980class Selenium::WebDriver::Logs1981 # @api private1982 # @return [Logs] a new instance of Logs1983 def initialize(bridge); end1984 def available_types; end1985 def get(type); end1986end1987class Selenium::WebDriver::Manager1988 # @api private1989 # @return [Manager] a new instance of Manager1990 def initialize(bridge); end1991 # Add a cookie to the browser1992 #1993 # @option opts1994 # @option opts1995 # @option opts1996 # @option opts1997 # @option opts1998 # @option opts1999 # @param opts [Hash] the options to create a cookie with.2000 # @raise [ArgumentError] if :name or :value is not specified2001 def add_cookie(opts = T.unsafe(nil)); end2002 # Get all cookies2003 #2004 # @return [Array<Hash>] list of cookies2005 def all_cookies; end2006 # Get the cookie with the given name2007 #2008 # @param name [String] the name of the cookie2009 # @return [Hash, nil] the cookie, or nil if it wasn't found.2010 def cookie_named(name); end2011 # Delete all cookies2012 def delete_all_cookies; end2013 # Delete the cookie with the given name2014 #2015 # @param name [String] the name of the cookie to delete2016 def delete_cookie(name); end2017 def logs; end2018 # @param type [Symbol] Supports two values: :tab and :window.2019 # @return [String] The value of the window handle2020 def new_window(type = T.unsafe(nil)); end2021 def timeouts; end2022 def window; end2023 private2024 def convert_cookie(cookie); end2025 def datetime_at(int); end2026 def seconds_from(obj); end2027 def strip_port(str); end2028end2029Selenium::WebDriver::Manager::SECONDS_PER_DAY = T.let(T.unsafe(nil), Float)2030class Selenium::WebDriver::Navigation2031 # @return [Navigation] a new instance of Navigation2032 def initialize(bridge); end2033 # Move back a single entry in the browser's history.2034 def back; end2035 # Move forward a single entry in the browser's history.2036 def forward; end2037 # Refresh the current page.2038 def refresh; end2039 # Navigate to the given URL2040 def to(url); end2041end2042class Selenium::WebDriver::Options2043 # @return [Options] a new instance of Options2044 def initialize(options: T.unsafe(nil), **opts); end2045 def ==(other); end2046 # Add a new option not yet handled by bindings.2047 #2048 # @example Leave Chrome open when chromedriver is killed2049 # options = Selenium::WebDriver::Chrome::Options.new2050 # options.add_option(:detach, true)2051 # @param name [String, Symbol] Name of the option2052 # @param value [Boolean, String, Integer] Value of the option2053 def add_option(name, value = T.unsafe(nil)); end2054 # @api private2055 def as_json(*_arg0); end2056 def eql?(other); end2057 # Returns the value of attribute options.2058 def options; end2059 # Sets the attribute options2060 #2061 # @param value the value to set the attribute options to.2062 def options=(_arg0); end2063 private2064 def camel_case(str); end2065 # @return [Boolean]2066 def camelize?(_key); end2067 # @raise [TypeError]2068 def convert_json_key(key, camelize: T.unsafe(nil)); end2069 def generate_as_json(value, camelize_keys: T.unsafe(nil)); end2070 def process_browser_options(_browser_options); end2071 def process_json_hash(value, camelize_keys); end2072 def process_w3c_options(options); end2073 # @return [Boolean]2074 def w3c?(key); end2075 class << self2076 def chrome(**opts); end2077 # Returns the value of attribute driver_path.2078 def driver_path; end2079 def edge(**opts); end2080 def firefox(**opts); end2081 def ie(**opts); end2082 def internet_explorer(**opts); end2083 def microsoftedge(**opts); end2084 def safari(**opts); end2085 def set_capabilities; end2086 end2087end2088Selenium::WebDriver::Options::W3C_OPTIONS = T.let(T.unsafe(nil), Array)2089# @api private2090module Selenium::WebDriver::Platform2091 private2092 # @api private2093 def assert_executable(path); end2094 # @api private2095 def assert_file(path); end2096 # @api private2097 def bitsize; end2098 # @api private2099 def ci; end2100 # @api private2101 def cygwin?; end2102 # @api private2103 def cygwin_path(path, **opts); end2104 # @api private2105 def engine; end2106 # @api private2107 def exit_hook; end2108 # @api private2109 def find_binary(*binary_names); end2110 # @api private2111 def find_in_program_files(*binary_names); end2112 # @api private2113 def home; end2114 # @api private2115 def interfaces; end2116 # @api private2117 def ip; end2118 # @api private2119 def jruby?; end2120 # @api private2121 def linux?; end2122 # @api private2123 def localhost; end2124 # @api private2125 def mac?; end2126 # @api private2127 def make_writable(file); end2128 # @api private2129 def null_device; end2130 # @api private2131 def os; end2132 # @api private2133 def ruby_version; end2134 # @api private2135 def unix_path(path); end2136 # @api private2137 def windows?; end2138 # @api private2139 def windows_path(path); end2140 # @api private2141 def wrap_in_quotes_if_necessary(str); end2142 # @api private2143 def wsl?; end2144 class << self2145 # @api private2146 # @raise [Error::WebDriverError]2147 def assert_executable(path); end2148 # @api private2149 # @raise [Error::WebDriverError]2150 def assert_file(path); end2151 # @api private2152 def bitsize; end2153 # @api private2154 def ci; end2155 # @api private2156 # @return [Boolean]2157 def cygwin?; end2158 # @api private2159 def cygwin_path(path, **opts); end2160 # @api private2161 def engine; end2162 # @api private2163 def exit_hook; end2164 # @api private2165 def find_binary(*binary_names); end2166 # @api private2167 def find_in_program_files(*binary_names); end2168 # @api private2169 def home; end2170 # @api private2171 def interfaces; end2172 # @api private2173 def ip; end2174 # @api private2175 # @return [Boolean]2176 def jruby?; end2177 # @api private2178 # @return [Boolean]2179 def linux?; end2180 # @api private2181 # @raise [Error::WebDriverError]2182 def localhost; end2183 # @api private2184 # @return [Boolean]2185 def mac?; end2186 # @api private2187 def make_writable(file); end2188 # @api private2189 def null_device; end2190 # @api private2191 def os; end2192 # @api private2193 def ruby_version; end2194 # @api private2195 def unix_path(path); end2196 # @api private2197 # @return [Boolean]2198 def windows?; end2199 # @api private2200 def windows_path(path); end2201 # @api private2202 def wrap_in_quotes_if_necessary(str); end2203 # @api private2204 # @return [Boolean]2205 def wsl?; end2206 end2207end2208class Selenium::WebDriver::Point < ::Struct2209 # Returns the value of attribute x2210 #2211 # @return [Object] the current value of x2212 def x; end2213 # Sets the attribute x2214 #2215 # @param value [Object] the value to set the attribute x to.2216 # @return [Object] the newly set value2217 def x=(_); end2218 # Returns the value of attribute y2219 #2220 # @return [Object] the current value of y2221 def y; end2222 # Sets the attribute y2223 #2224 # @param value [Object] the value to set the attribute y to.2225 # @return [Object] the newly set value2226 def y=(_); end2227 class << self2228 def [](*_arg0); end2229 def inspect; end2230 def keyword_init?; end2231 def members; end2232 def new(*_arg0); end2233 end2234end2235module Selenium::WebDriver::PointerActions2236 # Clicks in the middle of the given element. Equivalent to:2237 #2238 # driver.action.move_to(element).click2239 #2240 # When no element is passed, the current mouse position will be clicked.2241 #2242 # @example Clicking on an element2243 #2244 # el = driver.find_element(id: "some_id")2245 # driver.action.click(el).perform2246 # @example Clicking at the current mouse position2247 #2248 # driver.action.click.perform2249 # @param element [Selenium::WebDriver::Element] An optional element to click.2250 # @param device [Symbol || String] optional name of the PointerInput device with the button2251 # that will be clicked2252 # @return [ActionBuilder] A self reference.2253 def click(element = T.unsafe(nil), device: T.unsafe(nil)); end2254 # Clicks (without releasing) in the middle of the given element. This is2255 # equivalent to:2256 #2257 # driver.action.move_to(element).click_and_hold2258 #2259 # @example Clicking and holding on some element2260 #2261 # el = driver.find_element(id: "some_id")2262 # driver.action.click_and_hold(el).perform2263 # @param element [Selenium::WebDriver::Element] the element to move to and click.2264 # @param device [Symbol || String] optional name of the PointerInput device to click with2265 # @return [ActionBuilder] A self reference.2266 def click_and_hold(element = T.unsafe(nil), device: T.unsafe(nil)); end2267 # Performs a context-click at middle of the given element. First performs2268 # a move_to to the location of the element.2269 #2270 # When no element is passed, the current mouse position will be context-clicked.2271 #2272 # @example Context-click at middle of given element2273 #2274 # el = driver.find_element(id: "some_id")2275 # driver.action.context_click(el).perform2276 # @example Context-clicking at the current mouse position2277 #2278 # driver.action.context_click.perform2279 # @param element [Selenium::WebDriver::Element] An element to context click.2280 # @param device [Symbol || String] optional name of the PointerInput device with the button2281 # that will be context-clicked2282 # @return [ActionBuilder] A self reference.2283 def context_click(element = T.unsafe(nil), device: T.unsafe(nil)); end2284 # The overridable duration for movement used by methods in this module2285 def default_move_duration; end2286 # Sets the attribute default_move_duration2287 #2288 # @param value the value to set the attribute default_move_duration to.2289 def default_move_duration=(_arg0); end2290 # Performs a double-click at middle of the given element. Equivalent to:2291 #2292 # driver.action.move_to(element).double_click2293 #2294 # When no element is passed, the current mouse position will be double-clicked.2295 #2296 # @example Double-click an element2297 #2298 # el = driver.find_element(id: "some_id")2299 # driver.action.double_click(el).perform2300 # @example Double-clicking at the current mouse position2301 #2302 # driver.action.double_click.perform2303 # @param element [Selenium::WebDriver::Element] An optional element to move to.2304 # @param device [Symbol || String] optional name of the PointerInput device with the button2305 # that will be double-clicked2306 # @return [ActionBuilder] A self reference.2307 def double_click(element = T.unsafe(nil), device: T.unsafe(nil)); end2308 # A convenience method that performs click-and-hold at the location of the2309 # source element, moves to the location of the target element, then2310 # releases the mouse.2311 #2312 # @example Drag and drop one element onto another2313 #2314 # el1 = driver.find_element(id: "some_id1")2315 # el2 = driver.find_element(id: "some_id2")2316 # driver.action.drag_and_drop(el1, el2).perform2317 # @param source [Selenium::WebDriver::Element] element to emulate button down at.2318 # @param target [Selenium::WebDriver::Element] element to move to and release the2319 # mouse at.2320 # @param device [Symbol || String] optional name of the PointerInput device with the button2321 # that will perform the drag and drop2322 # @return [ActionBuilder] A self reference.2323 def drag_and_drop(source, target, device: T.unsafe(nil)); end2324 # A convenience method that performs click-and-hold at the location of2325 # the source element, moves by a given offset, then releases the mouse.2326 #2327 # @example Drag and drop an element by offset2328 #2329 # el = driver.find_element(id: "some_id1")2330 # driver.action.drag_and_drop_by(el, 100, 100).perform2331 # @param source [Selenium::WebDriver::Element] Element to emulate button down at.2332 # @param right_by [Integer] horizontal move offset.2333 # @param down_by [Integer] vertical move offset.2334 # @param device [Symbol || String] optional name of the PointerInput device with the button2335 # that will perform the drag and drop2336 # @return [ActionBuilder] A self reference.2337 def drag_and_drop_by(source, right_by, down_by, device: T.unsafe(nil)); end2338 # Moves the mouse from its current position by the given offset.2339 # If the coordinates provided are outside the viewport (the mouse will2340 # end up outside the browser window) then the viewport is scrolled to2341 # match.2342 #2343 # @example Move the mouse to a certain offset from its current position2344 #2345 # driver.action.move_by(100, 100).perform2346 # @param right_by [Integer] horizontal offset. A negative value means moving the mouse left.2347 # @param down_by [Integer] vertical offset. A negative value means moving the mouse up.2348 # @param device [Symbol || String] optional name of the PointerInput device to move2349 # @raise [MoveTargetOutOfBoundsError] if the provided offset is outside the document's boundaries.2350 # @return [ActionBuilder] A self reference.2351 def move_by(right_by, down_by, device: T.unsafe(nil)); end2352 # Moves the mouse to the middle of the given element. The element is scrolled into2353 # view and its location is calculated using getBoundingClientRect. Then the2354 # mouse is moved to optional offset coordinates from the element.2355 #2356 # This is adapted to be backward compatible from non- actions. calculates offset from the center point2357 # of the element2358 #2359 # Note that when using offsets, both coordinates need to be passed.2360 #2361 # @example Scroll element into view and move the mouse to it2362 #2363 # el = driver.find_element(id: "some_id")2364 # driver.action.move_to(el).perform2365 # @example2366 #2367 # el = driver.find_element(id: "some_id")2368 # driver.action.move_to(el, 100, 100).perform2369 # @param element [Selenium::WebDriver::Element] to move to.2370 # @param right_by [Integer] Optional offset from the top-left corner. A negative value means2371 # coordinates to the left of the element.2372 # @param down_by [Integer] Optional offset from the top-left corner. A negative value means2373 # coordinates above the element.2374 # @param device [Symbol || String] optional name of the PointerInput device to move.2375 # @return [ActionBuilder] A self reference.2376 def move_to(element, right_by = T.unsafe(nil), down_by = T.unsafe(nil), device: T.unsafe(nil)); end2377 # Moves the mouse to a given location in the viewport.2378 # If the coordinates provided are outside the viewport (the mouse will2379 # end up outside the browser window) then the viewport is scrolled to2380 # match.2381 #2382 # @example Move the mouse to a certain position in the viewport2383 #2384 # driver.action.move_to_location(100, 100).perform2385 # @param x [Integer] horizontal position. Equivalent to a css 'left' value.2386 # @param y [Integer] vertical position. Equivalent to a css 'top' value.2387 # @param device [Symbol || String] optional name of the PointerInput device to move2388 # @raise [MoveTargetOutOfBoundsError] if the provided x or y value is outside the document's boundaries.2389 # @return [ActionBuilder] A self reference.2390 def move_to_location(x, y, device: T.unsafe(nil)); end2391 # Presses (without releasing) at the current location of the PointerInput device. This is equivalent to:2392 #2393 # driver.action.click_and_hold(nil)2394 #2395 # @example Clicking and holding at the current location2396 #2397 # driver.action.pointer_down(:left).perform2398 # @param button [Selenium::WebDriver::Interactions::PointerPress::BUTTONS] the button to press.2399 # @param device [Symbol || String] optional name of the PointerInput device with the button2400 # that will be pressed2401 # @return [ActionBuilder] A self reference.2402 def pointer_down(button, device: T.unsafe(nil)); end2403 # Releases the pressed mouse button at the current mouse location of the PointerInput device.2404 #2405 # @example Releasing a button after clicking and holding2406 #2407 # driver.action.pointer_down(:left).pointer_up(:left).perform2408 # @param button [Selenium::WebDriver::Interactions::PointerPress::BUTTONS] the button to release.2409 # @param device [Symbol || String] optional name of the PointerInput device with the button that will2410 # be released2411 # @return [ActionBuilder] A self reference.2412 def pointer_up(button, device: T.unsafe(nil)); end2413 # Releases the depressed left mouse button at the current mouse location.2414 #2415 # @example Releasing an element after clicking and holding it2416 #2417 # el = driver.find_element(id: "some_id")2418 # driver.action.click_and_hold(el).release.perform2419 # @param device [Symbol || String] optional name of the PointerInput device with the button2420 # that will be released2421 # @return [ActionBuilder] A self reference.2422 def release(device: T.unsafe(nil)); end2423 private2424 def button_action(button, action: T.unsafe(nil), device: T.unsafe(nil)); end2425 def get_pointer(device = T.unsafe(nil)); end2426end2427class Selenium::WebDriver::PortProber2428 class << self2429 def above(port); end2430 # @return [Boolean]2431 def free?(port); end2432 end2433end2434Selenium::WebDriver::PortProber::IGNORED_ERRORS = T.let(T.unsafe(nil), Array)2435# Common methods for Chrome::Profile and Firefox::Profile2436# Includers must implement #layout_on_disk2437#2438# @api private2439module Selenium::WebDriver::ProfileHelper2440 mixes_in_class_methods ::Selenium::WebDriver::ProfileHelper::ClassMethods2441 # @api private2442 def as_json(*_arg0); end2443 # @api private2444 def encoded; end2445 # @api private2446 def to_json(*_arg0); end2447 private2448 # @api private2449 def create_tmp_copy(directory); end2450 # @api private2451 # @raise [Errno::ENOENT]2452 def verify_model(model); end2453 class << self2454 # @api private2455 def decoded(json); end2456 # @api private2457 # @private2458 def included(base); end2459 end2460end2461# @api private2462module Selenium::WebDriver::ProfileHelper::ClassMethods2463 # @api private2464 def from_json(json); end2465end2466class Selenium::WebDriver::Proxy2467 # @raise [ArgumentError]2468 # @return [Proxy] a new instance of Proxy2469 def initialize(opts = T.unsafe(nil)); end2470 def ==(other); end2471 def as_json(*_arg0); end2472 def auto_detect; end2473 def auto_detect=(bool); end2474 def eql?(other); end2475 def ftp; end2476 def ftp=(value); end2477 def http; end2478 def http=(value); end2479 def no_proxy; end2480 def no_proxy=(value); end2481 def pac; end2482 def pac=(url); end2483 def socks; end2484 def socks=(value); end2485 def socks_password; end2486 def socks_password=(value); end2487 def socks_username; end2488 def socks_username=(value); end2489 def socks_version; end2490 def socks_version=(value); end2491 def ssl; end2492 def ssl=(value); end2493 def to_json(*_arg0); end2494 def type; end2495 def type=(type); end2496 class << self2497 def json_create(data); end2498 end2499end2500Selenium::WebDriver::Proxy::ALLOWED = T.let(T.unsafe(nil), Hash)2501Selenium::WebDriver::Proxy::TYPES = T.let(T.unsafe(nil), Hash)2502class Selenium::WebDriver::Rectangle < ::Struct2503 # Returns the value of attribute height2504 #2505 # @return [Object] the current value of height2506 def height; end2507 # Sets the attribute height2508 #2509 # @param value [Object] the value to set the attribute height to.2510 # @return [Object] the newly set value2511 def height=(_); end2512 # Returns the value of attribute width2513 #2514 # @return [Object] the current value of width2515 def width; end2516 # Sets the attribute width2517 #2518 # @param value [Object] the value to set the attribute width to.2519 # @return [Object] the newly set value2520 def width=(_); end2521 # Returns the value of attribute x2522 #2523 # @return [Object] the current value of x2524 def x; end2525 # Sets the attribute x2526 #2527 # @param value [Object] the value to set the attribute x to.2528 # @return [Object] the newly set value2529 def x=(_); end2530 # Returns the value of attribute y2531 #2532 # @return [Object] the current value of y2533 def y; end2534 # Sets the attribute y2535 #2536 # @param value [Object] the value to set the attribute y to.2537 # @return [Object] the newly set value2538 def y=(_); end2539 class << self2540 def [](*_arg0); end2541 def inspect; end2542 def keyword_init?; end2543 def members; end2544 def new(*_arg0); end2545 end2546end2547module Selenium::WebDriver::Remote; end2548# https://w3c.github.io/webdriver/#endpoints2549#2550# @api private2551class Selenium::WebDriver::Remote::Bridge2552 include ::Selenium::WebDriver::Atoms2553 # Initializes the bridge with the given server URL2554 #2555 # @api private2556 # @param :url [String, URI] url for the remote server2557 # @param :http_client [Object] an HTTP client instance that implements the same protocol as Http::Default2558 # @return [Bridge] a new instance of Bridge2559 def initialize(url:, http_client: T.unsafe(nil)); end2560 # alerts2561 def accept_alert; end2562 # actions2563 def action(async = T.unsafe(nil)); end2564 # actions2565 def actions(async = T.unsafe(nil)); end2566 # finding elements2567 def active_element; end2568 def add_cookie(cookie); end2569 def alert=(keys); end2570 def alert_text; end2571 def browser; end2572 # Returns the value of attribute capabilities.2573 def capabilities; end2574 def clear_element(element); end2575 def clear_local_storage; end2576 def clear_session_storage; end2577 def click_element(element); end2578 def close; end2579 def cookie(name); end2580 def cookies; end2581 # Creates session.2582 #2583 # @raise [Error::WebDriverError]2584 def create_session(capabilities); end2585 def delete_all_cookies; end2586 def delete_cookie(name); end2587 def dismiss_alert; end2588 def element_aria_label(element); end2589 def element_aria_role(element); end2590 def element_attribute(element, name); end2591 # @return [Boolean]2592 def element_displayed?(element); end2593 def element_dom_attribute(element, name); end2594 # @return [Boolean]2595 def element_enabled?(element); end2596 def element_location(element); end2597 def element_location_once_scrolled_into_view(element); end2598 def element_property(element, name); end2599 def element_rect(element); end2600 def element_screenshot(element); end2601 # @return [Boolean]2602 def element_selected?(element); end2603 def element_size(element); end2604 # element properties2605 def element_tag_name(element); end2606 def element_text(element); end2607 def element_value(element); end2608 def element_value_of_css_property(element, prop); end2609 def execute_async_script(script, *args); end2610 # javascript execution2611 def execute_script(script, *args); end2612 # Returns the value of attribute file_detector.2613 def file_detector; end2614 # Sets the attribute file_detector2615 #2616 # @param value the value to set the attribute file_detector to.2617 def file_detector=(_arg0); end2618 def find_element_by(how, what, parent_ref = T.unsafe(nil)); end2619 def find_elements_by(how, what, parent_ref = T.unsafe(nil)); end2620 def full_screen_window; end2621 def get(url); end2622 # navigation...

Full Screen

Full Screen

web_helper.rb

Source:web_helper.rb Github

copy

Full Screen

...73 def check_details(expected_properties)74 expect(Selenium::WebDriver::Wait.new(timeout: 5).until { @driver.find_element(id: "#{tab_id}DetailsLabel").displayed? }).to be(true)75 properties = Selenium::WebDriver::Wait.new(timeout: 5).until { @driver.find_elements(xpath: "//div[@id='#{tab_id}PropertiesContainer']/table/tr[*]/td[1]") }76 values = Selenium::WebDriver::Wait.new(timeout: 5).until { @driver.find_elements(xpath: "//div[@id='#{tab_id}PropertiesContainer']/table/tr[*]/td[2]") }77 property_index = 078 expected_properties.each do |expected_property|79 expect(properties[property_index].text).to eq("#{expected_property[:label]}:")80 value = if expected_property[:tag].nil?81 values[property_index].text82 elsif expected_property[:tag] == 'img'83 values[property_index].find_element(tag_name: 'div').attribute('innerHTML')84 else85 values[property_index].find_element(tag_name: expected_property[:tag]).text86 end87 expect(value).to eq(expected_property[:value])88 property_index += 189 end90 end91 def check_filter_link(tab_id, link_index, target_tab_id, expected_filter)92 # TODO: Behavior of selenium-webdriver. Entire item must be displayed for it to click. Workaround following two lines after commented out code93 # Selenium::WebDriver::Wait.new(timeout: 5).until { @driver.find_elements(xpath: "//div[@id='#{tab_id}PropertiesContainer']/table/tr[*]/td[2]")[link_index].find_element(tag_name: 'a').click }94 element = @driver.find_elements(xpath: "//div[@id='#{tab_id}PropertiesContainer']/table/tr[*]/td[2]")[link_index].find_element(tag_name: 'a')95 @driver.execute_script('arguments[0].click();', element)96 expect(Selenium::WebDriver::Wait.new(timeout: 5).until { @driver.find_element(class_name: 'menuItemSelected').attribute('id') }).to eq(target_tab_id)97 expect(Selenium::WebDriver::Wait.new(timeout: 5).until { @driver.find_element(id: target_tab_id).displayed? }).to eq(true)98 expect(Selenium::WebDriver::Wait.new(timeout: 5).until { @driver.find_element(id: "#{target_tab_id}Table_filter").find_element(tag_name: 'input').attribute('value') }).to eq(expected_filter)99 end100 def check_stats_chart(id)101 begin102 Selenium::WebDriver::Wait.new(timeout: 5).until { @driver.find_element(id: "#{id}Chart").displayed? }...

Full Screen

Full Screen

example-rspec-capybara.rb

Source:example-rspec-capybara.rb Github

copy

Full Screen

...143 Capybara.default_driver = :selenium144when "SAFARI"145 #tested: Safari 10.1.1146 #result: as of Safari 10 there are many problems and not all tests will work147 #This is a standard property but doesn't seem to be working in Safari yet: 148 # desired_caps = Selenium::WebDriver::Remote::Capabilities.safari(149 # {150 # accept_insecure_certs: (ENV['ACCEPTALLCERTS'] == "true")151 # }152 # )153 Capybara.register_driver :selenium do |app|154 Capybara::Selenium::Driver.new(155 app,156 browser: :safari #,157 #desired_capabilities: desired_caps158 )159 end160 Capybara.default_driver = :selenium161when "SAFARI-TECHNOLOGY-PREVIEW"162 #This is what we use to test the Safari release channel. 163 #You will have to install Safari Technology Preview from Apple.164 #This is a standard property but doesn't seem to be working in Safari yet:165 # desired_caps = Selenium::WebDriver::Remote::Capabilities.safari(166 # {167 # accept_insecure_certs: (ENV['ACCEPTALLCERTS'] == "true")168 # }169 # )170 171 Capybara.register_driver :selenium do |app|172 Capybara::Selenium::Driver.new(173 app,174 browser: :safari,175 driver_path: '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver' #,176 #desired_capabilities: desired_caps177 )178 end...

Full Screen

Full Screen

example-rspec.rb

Source:example-rspec.rb Github

copy

Full Screen

...112 Selenium::WebDriver::Firefox.path = ENV['FIREFOXPATH']113 end114 @driver = Selenium::WebDriver.for :firefox, desired_capabilities: desired_caps115 when "SAFARI"116 #This is a standard property but doesn't seem to be working in Safari yet:117 # desired_caps = Selenium::WebDriver::Remote::Capabilities.safari(118 # {119 # accept_insecure_certs: (ENV['ACCEPTALLCERTS'] == "true")120 # }121 # )122 @driver = Selenium::WebDriver.for :safari #,desired_capabilities: desired_caps123 when "SAFARI-TECHNOLOGY-PREVIEW"124 #This is a standard property but doesn't seem to be working in Safari yet:125 # desired_caps = Selenium::WebDriver::Remote::Capabilities.safari(126 # {127 # accept_insecure_certs: (ENV['ACCEPTALLCERTS'] == "true")128 # }129 # )130 @driver = Selenium::WebDriver.for :safari, driver_path: '/Applications/Safari Technology Preview.app/Contents/MacOS/safaridriver' #,desired_capabilities: desired_caps131 else132 #default to Firefox133 #works <FF48 && >=FF48134 @driver = Selenium::WebDriver.for :firefox135 end136 @accept_next_alert = true137 @driver.manage.timeouts.implicit_wait = (ENV['TIMEOUT'] || 20).to_i138 @verification_errors = []...

Full Screen

Full Screen

env.rb

Source:env.rb Github

copy

Full Screen

...120 when "SAFARI"121 #tested: Safari 10.1.1122 #result: as of Safari 10 there are many problems and not all tests will work123 #see standard properties here: https://www.w3.org/TR/webdriver/#capabilities124 #This is a standard property but doesn't seem to be working in Safari yet: 125 # desired_caps = Selenium::WebDriver::Remote::Capabilities.safari(126 # {127 # accept_insecure_certs: (ENV['ACCEPTALLCERTS'] == "true")128 # }129 # )130 Capybara.register_driver :selenium do |app|131 Capybara::Selenium::Driver.new(132 app,133 browser: :safari #,134 #desired_capabilities: desired_caps135 )136 end137 Capybara.default_driver = :selenium138 when "SAFARI-TECHNOLOGY-PREVIEW"...

Full Screen

Full Screen

element.rb

Source:element.rb Github

copy

Full Screen

...34 not enabled?35 end36 37 #38 # get the value of the given CSS property39 #40 def style(property)41 element.style property42 end43 44 def inspect45 element.inspect46 end47 #48 # retrieve the class name for an element49 #50 def class_name51 attribute 'class'52 end53 # @private54 def self.watir_identifier_for identifier55 if should_build_watir_xpath(identifier)...

Full Screen

Full Screen

script_38_03.rb

Source:script_38_03.rb Github

copy

Full Screen

...59 @driver.find_element(:name, "param[term]").clear60 @driver.find_element(:name, "param[term]").send_keys "30"61 Selenium::WebDriver::Support::Select.new(@driver.find_element(:name, "param[start_month]")).select_by(:text, "Sep")62 Selenium::WebDriver::Support::Select.new(@driver.find_element(:name, "param[start_year]")).select_by(:text, "2012")63 @driver.find_element(:name, "param[property_tax]").clear64 @driver.find_element(:name, "param[property_tax]").send_keys "0"65 @driver.find_element(:name, "param[pmi]").clear66 @driver.find_element(:name, "param[pmi]").send_keys "0"67 68 69 @driver.save_screenshot('pic_1a.png')70 @driver.find_element(:css, "input[type=\"submit\"]").click71 72 # Verify Monthly Payment is $2,529.6273 74 assert_equal "$2,529.62", @driver.find_element(:xpath, "//table[@id='summary']/tbody/tr[3]/td[1]/h3").text75 76 77 $new_value_A = @driver.find_element(:xpath, "//table[@id='summary']/tbody/tr[3]/td[1]/h3").text78 $new_value_A = $new_value_A.delete(',').slice!(1..-1).to_f79 puts "If Interest Rate is 3% then Monthly Payment is \t $#{$new_value_A}"80 81 puts $new_value_A.class82 83 @driver.save_screenshot('pic_1b.png')84 85 end86 87 # Input: Home Value - 800,000, Credit Profile - Good, Loan Amount - 600,00, Loan Purpose - New Purchase, Ineterst Rate - 4%,88 # Loan Term - 30 years, Start Date - Sep 2012, Property Tax - 0%, PMI - 0%.89 90 def test_hw38_3b91 @driver.get(@web_page + "/")92 @driver.find_element(:name, "param[homevalue]").clear93 @driver.find_element(:name, "param[homevalue]").send_keys "800,000"94 Selenium::WebDriver::Support::Select.new(@driver.find_element(:name, "param[credit]")).select_by(:text, "Good")95 @driver.find_element(:name, "param[principal]").clear96 @driver.find_element(:name, "param[principal]").send_keys "600,000"97 Selenium::WebDriver::Support::Select.new(@driver.find_element(:name, "param[rp]")).select_by(:text, "New Purchase")98 @driver.find_element(:name, "param[interest_rate]").clear99 @driver.find_element(:name, "param[interest_rate]").send_keys "4"100 @driver.find_element(:name, "param[term]").clear101 @driver.find_element(:name, "param[term]").send_keys "30"102 Selenium::WebDriver::Support::Select.new(@driver.find_element(:name, "param[start_month]")).select_by(:text, "Sep")103 Selenium::WebDriver::Support::Select.new(@driver.find_element(:name, "param[start_year]")).select_by(:text, "2012")104 @driver.find_element(:name, "param[property_tax]").clear105 @driver.find_element(:name, "param[property_tax]").send_keys "0"106 @driver.find_element(:name, "param[pmi]").clear107 @driver.find_element(:name, "param[pmi]").send_keys "0"108 109 110 @driver.save_screenshot('pic_2a.png')111 @driver.find_element(:css, "input[type=\"submit\"]").click112 113 # Verify Monthly Payment is $2,864.49114 115 assert_equal "$2,864.49", @driver.find_element(:xpath, "//table[@id='summary']/tbody/tr[3]/td[1]/h3").text116 117 118 $new_value_B = @driver.find_element(:xpath, "//table[@id='summary']/tbody/tr[3]/td[1]/h3").text119 $new_value_B = $new_value_B.delete(',').slice!(1..-1).to_f...

Full Screen

Full Screen

Gemfile

Source:Gemfile Github

copy

Full Screen

1source 'https://rubygems.org' do2 # It's good to keep these gem versions in step with the versions used in3 # apm_bundle/apps/property/Gemfile. You can check the version being used4 # thusly:5 #6 # $ cd ~/src/apm_bundle/apps/property7 # $ bundle show selenium-webdriver8 # /Users/natalieschauser/.rvm/gems/ruby-2.3.3/gems/selenium-webdriver-3.9.09 #10 # So I want to make sure SELENIUM_WEBDRIVER below is set to 3.9.011 module PropertyGemVersions12 AE_PAGE_OBJECTS = '3.1.1'13 CAPYBARA = '2.17.0'14 MINITEST = '5.8.0'15 NOKOGIRI = '1.6.7.2'16 RAILS = '5.0.7'17 SELENIUM_WEBDRIVER = '3.9.0'18 SQLITE3 = '1.3.11'19 end20 gem 'rails', PropertyGemVersions::RAILS21 gem 'sqlite3', PropertyGemVersions::SQLITE322 gem 'jquery-rails'23 group :test do24 gem 'ae_page_objects', PropertyGemVersions::AE_PAGE_OBJECTS25 gem 'capybara', PropertyGemVersions::CAPYBARA26 gem 'minitest', PropertyGemVersions::MINITEST27 gem 'nokogiri', PropertyGemVersions::NOKOGIRI28 gem 'selenium-webdriver', PropertyGemVersions::SELENIUM_WEBDRIVER29 end30 group :development do31 # (Copied from apm_bundle/apps/property/Gemfile)32 #33 # Incompatibilities have developed between versions of pry-byebug and34 # pry-remote. Through experimentation and research, I've determined that by35 # just constraining pry-byebug to '< 2' our whole pry ecosystem plays nicely36 # together again. I chose '< 2' because it's the least restrictive37 # constraint that gets us what we want. Here are some discussions of the38 # compatibility issues:39 # * https://github.com/deivid-rodriguez/pry-byebug/issues/3340 # * https://github.com/Mon-Ouie/pry-remote/issues/6141 gem 'pry'42 gem 'pry-byebug', '< 2'43 gem 'pry-editline'44 gem 'pry-rails'45 gem 'pry-remote'...

Full Screen

Full Screen

property

Using AI Code Generation

copy

Full Screen

1driver.find_element(:name, "q").send_keys "Selenium"2driver.find_element(:name, "btnG").click3Starting Firefox 3.6 (Win32)

Full Screen

Full Screen

property

Using AI Code Generation

copy

Full Screen

1driver.manage.add_cookie(:name => 'Selenium', :value => 'WeDriver')2dr.manage.delete_cookie(Selenium')3driver.manage.window.size = ::Dimension.new(400, 600)4driver.manage.window.position = Selenium::WebDriver::Point.new(100, 200)

Full Screen

Full Screen

property

Using AI Code Generation

copy

Full Screen

1driver.find_element(:name, "q").send_keys "Selenium"2driver.find_element(:name, "btnG").click3Starting Firefox 3.6 (Win32)

Full Screen

Full Screen

property

Using AI Code Generation

copy

Full Screen

1puts driver.property("version")2driver.manage.add_cookie(:name => 'Selenium', :value => 'WebDriver')3driver.manage.delete_cookie('Selenium')4driver.manage.window.size = Selenium::WebDriver::Dimension.new(400, 600)5driver.manage.window.position = Selenium::WebDriver::Point.new(100, 200)

Full Screen

Full Screen

property

Using AI Code Generation

copy

Full Screen

1element = driver.find_element(:name, "q")2element = driver.find_element(:name, "q")3element = driver.find_element(:class, "rc")4puts element.property("textContent")

Full Screen

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 Selenium automation tests on LambdaTest cloud grid

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

Most used method in

Try LambdaTest Now !!

Get 100 minutes of automation test minutes FREE!!

Next-Gen App & Browser Testing Cloud

Was this article helpful?

Helpful

NotHelpful