SimpleBrowserDotNet / SimpleBrowser.WebDriver

A webdriver for SimpleBrowser
Apache License 2.0
43 stars 16 forks source link

Not updated with SimpleBrowser latest version? #37

Closed vickyRathee closed 7 years ago

vickyRathee commented 7 years ago

There are couple of additional method available in SimpleBrowser to support HTTP POST as well, but not on WebDriver. Any specific reason or this is not updated?

public bool Navigate(Uri url, string postData, string contentType); public bool Navigate(Uri url, NameValueCollection postData, string contentType = null, string encodingType = null);

Teun commented 7 years ago

The concept of using webdriver for automation is that you program user actions. So clicking links and buttons, not getting and posting.

So depending of how your website world, you should search for an element on the page to click.

Teun

Op 23 nov. 2016 11:48 a.m. schreef "vickyrathee" notifications@github.com:

There are couple of additional method available in SimpleBrowser to support HTTP POST as well, but not on WebDriver. Any specific reason or this is not updated?

public bool Navigate(Uri url, string postData, string contentType); public bool Navigate(Uri url, NameValueCollection postData, string contentType = null, string encodingType = null);

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/SimpleBrowserDotNet/SimpleBrowser.WebDriver/issues/37, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeIT5avYs35bgPKIaf6GTSXQiCb21Biks5rBBnygaJpZM4K6cAz .

vickyRathee commented 7 years ago

@Teun I'm testing a search box with autocomplete feature, Every time we type a something a HTTP post is sent to server to get the response. Unfortunately this doesn't trigger by any click button and the response is not in HTML. So i can't read the response with HTTP Post support.

What do you think?

Teun commented 7 years ago

SimpleBrowser does not support javascript. I expect your autocomplete box to rely on javascript, so this is not going to work, I'm afraid.

T

2016-11-23 12:42 GMT+01:00 vickyrathee notifications@github.com:

@Teun https://github.com/Teun I'm testing a search box with autocomplete feature, Every time we type a something a HTTP post is sent to server to get the response. Unfortunately this doesn't trigger by any click button and the response is not in HTML. So i can't read the response with HTTP Post support.

What do you think?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SimpleBrowserDotNet/SimpleBrowser.WebDriver/issues/37#issuecomment-262492484, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeIT-an-jmIT8ZYt_bgwcSuHOP4OEQJks5rBCafgaJpZM4K6cAz .

vickyRathee commented 7 years ago

That was the reason I was asking for HTTP Post. Because using this method I can send a POST request to endpoint without need of JavaScript. I can do this in SimpleBrowser, but not with WebDriver because it's missing.

public bool Navigate(Uri url, string postData, string contentType);

Teun commented 7 years ago

Point is: the IWebDriver interface doesn't allow you to do that. SimpleBrowser.WebDriver is an implementation for that interface.

However, there may be a way to do this. The normal way to get a handle to a driver is like this: IWebDriver browser = new SimpleBrowserDriver();

On the inside, this will create an instance of SimpleBrowser, but you cannot access it. If you do it like this, you can still perform calls on SimpleBroswer that WebDriver doesn't allow for:

Browser b = new Browser(); IWebDriver driver = new SimpleBrowserDriver(new BrowserWrapper(b));

Does that help you out?

T

2016-11-23 13:36 GMT+01:00 vickyrathee notifications@github.com:

That was the reason I was asking for HTTP Post. Because using this method I can send a POST request to endpoint without need of JavaScript. I can do this in SimpleBrowser, but not with WebDriver because it's missing.

public bool Navigate(Uri url, string postData, string contentType);

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/SimpleBrowserDotNet/SimpleBrowser.WebDriver/issues/37#issuecomment-262502091, or mute the thread https://github.com/notifications/unsubscribe-auth/AAeITxGkHx5qMSOc8cwEHJqXkSkaNGwrks5rBDNNgaJpZM4K6cAz .