jonhoo / fantoccini

A high-level API for programmatically interacting with web pages through WebDriver.
Apache License 2.0
1.68k stars 125 forks source link

incomplete attr #258

Open Mon-ius opened 5 months ago

Mon-ius commented 5 months ago

consider <div class="A B C D">

The result of attr of these shoud be same

    let qid = "div.A";
    let _ = client.wait().for_element(Locator::Css(qid)).await?;
    let question = client.find(Locator::Css(qid)).await?;
    let attr = question.attr("class").await?.unwrap();
    let qid = "div.B";
    let _ = client.wait().for_element(Locator::Css(qid)).await?;
    let question = client.find(Locator::Css(qid)).await?;
    let attr = question.attr("class").await?.unwrap();
    let qid = "div.C";
    let _ = client.wait().for_element(Locator::Css(qid)).await?;
    let question = client.find(Locator::Css(qid)).await?;
    let attr = question.attr("class").await?.unwrap();
jonhoo commented 4 months ago

Is that not the case? What output do you get? We just pass this directly on to WebDriver, so it's unlikely there's an issue in fantoccini here. If you could submit a PR with a new test that fails on this, that'd be helpful!