Thank you for the response. This works fine on chrome browser with w3c set to true.
However, on Edge chromium if I set W3C to true, I get this error. It looks like a bug in Edge driver? *Backtrace:: unknown command: Cannot call non W3C standard command while in W3C mode (Selenium::WebDriver::Error::UnknownCommandError)* from Ordinal0 [0x00007FF66AAB8F72+4099954] from Ordinal0 [0x00007FF66A98E439+2876473] from Ordinal0 [0x00007FF66A800227+1245735] from Ordinal0 [0x00007FF66A757300+553728] from Ordinal0 [0x00007FF66A75824E+557646] from Ordinal0 [0x00007FF66A9AAA66+2992742] from GetHandleVerifier [0x00007FF66ABFB5D3+1202179] from GetHandleVerifier [0x00007FF66AC10371+1287585] from GetHandleVerifier [0x00007FF66ABFC227+1205335] from Ordinal0 [0x00007FF66A99F3A1+2945953] from Ordinal0 [0x00007FF66A9AC8A9+3000489] from Ordinal0 [0x00007FF66A9C14D8+3085528] from BaseThreadInitThunk [0x00007FFD1ED07BD4+20] from RtlUserThreadStart [0x00007FFD1F36CE51+33] from C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/response.rb:72:in `assert_ok' On Wednesday, September 2, 2020 at 9:40:20 AM UTC-4 [email protected] wrote: > Is there a reason you are setting w3c to false? (if you are testing on > Chromium > 75 you should be using w3c) > > Try setting w3c to true, and if it doesn't work, try running it with > Chrome. If things are still failing, we'll have to figure out the right bug > report for the chromedriver/chromium teams. > > On Tue, Sep 1, 2020 at 10:46 AM Champ <[email protected]> wrote: > >> I am using the below code to start using Watir-webdriver with Edge >> Chromium browser. I have the right versions and drivers. It launches the >> browser and opens the url. >> But I get the following error when I try to interact with the >> browser(set, .present? etc.) >> >> Any pointers/fixes are really appreciated. >> >> >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/response.rb:72:in* >> >> `assert_ok': javascript error: a.getAttributeNode is not a function >> (Selenium::WebDriver::Error::JavascriptError)* >> >> Here is the code: >> >> *require* 'watir' >> *require* 'selenium-webdriver' >> >> Selenium::WebDriver::Edge::Service.driver_path *=* >> "c:/drivers/msedgedriver.exe" >> >> $browser *=* Watir::Browser.*new* >> :edge, "edgeOptions" => {"args" => [ "--start-maximized" ], "w3c" => false} >> >> $browser.goto("https://google.com") >> >> $browser.text_field(:name=>"q").set("watir") >> >> =============== >> >> Full stacktrace below: >> >> >ruby google_edge.rb >> >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/response.rb:72:in >> >> `assert_ok': javascript error: a.getAttributeNode is not a function >> (Selenium::WebDriver::Error::JavascriptError) >> >> (Session info: MicrosoftEdge=85.0.564.44) >> >> (Driver info: msedgedriver=85.0.564.44 >> (3b106b45f8e7cd4c3e2aac5a6ba411645c16df60),platform=Windows NT 10.0.18363 >> x86_64) >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/response.rb:34:in >> >> `initialize' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/common.rb:88:in >> >> `new' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/common.rb:88:in >> >> `create_response' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/default.rb:114:in >> >> `request' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/http/common.rb:64:in >> >> `call' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/bridge.rb:167:in >> >> `execute' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:567:in >> >> `execute' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:305:in >> >> `execute_script' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/atoms.rb:32:in >> >> `execute_atom' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/remote/w3c/bridge.rb:476:in >> >> `element_attribute' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/selenium-webdriver-3.142.7/lib/selenium/webdriver/common/element.rb:116:in >> >> `attribute' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/watir-6.17.0/lib/watir/elements/element.rb:315:in >> >> `block in attribute_value' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/watir-6.17.0/lib/watir/elements/element.rb:804:in >> >> `element_call' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/watir-6.17.0/lib/watir/elements/element.rb:315:in >> >> `attribute_value' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/watir-6.17.0/lib/watir/attribute_helper.rb:74:in >> >> `block in define_boolean_attribute' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/watir-6.17.0/lib/watir/elements/element.rb:719:in >> >> `wait_for_writable' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/watir-6.17.0/lib/watir/elements/element.rb:838:in >> >> `check_condition' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/watir-6.17.0/lib/watir/elements/element.rb:802:in >> >> `element_call' >> >> from >> C:/Ruby27-x64/lib/ruby/gems/2.7.0/gems/watir-6.17.0/lib/watir/user_editable.rb:10:in >> >> `set' >> >> from google_edge.rb:8:in `<main>' >> >> >Exit code: 1 >> >> >> >> -- >> -- >> Before posting, please read >> https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. >> >> >> In short: search before you ask, be nice. >> >> [email protected] >> http://groups.google.com/group/watir-general >> [email protected] >> --- >> You received this message because you are subscribed to the Google Groups >> "Watir General" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to [email protected]. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/watir-general/83cdcdf1-83cb-4190-bd2c-2a4be4a6f78dn%40googlegroups.com >> >> <https://groups.google.com/d/msgid/watir-general/83cdcdf1-83cb-4190-bd2c-2a4be4a6f78dn%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> > -- -- Before posting, please read https://github.com/watir/watir_meta/wiki/Guidelines-for-Posting-to-Watir-General-Google-Group. In short: search before you ask, be nice. [email protected] http://groups.google.com/group/watir-general [email protected] --- You received this message because you are subscribed to the Google Groups "Watir General" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/watir-general/c45c56bb-d9e8-48f2-94bc-03bf24985329n%40googlegroups.com.
