cancel
Showing results for 
Search instead for 
Did you mean: 

QuerySelector and multiple parameters

SOLVED
m_essaid
Valued Contributor

QuerySelector and multiple parameters

Hi,

I'm trying to automate a webpage essentially with QuerySelector.

I have a problem with a webpage that opens a popup : I have the same field in the main page than in the popup.

The popup had a the following div :

<div id="windowPopup>

And it contains the duplicated field which I have the following property :

data-bind="value: sSurname"

 

I need to use a combination of theses 2 properties to enter text on the right field.

 

Is it possible ? What could be the syntax please ?

Any help would be much appreciated,

1 ACCEPTED SOLUTION

Accepted Solutions
AlexKaras
Community Hero

Re: QuerySelector and multiple parameters

Hi,

 

What is the result of the execution of your code?

Try to replace .Click() with .click(). (Small initial 'c') Does it help?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

4 REPLIES 4
m_essaid
Valued Contributor

Re: QuerySelector and multiple parameters

I finaly figured it out !

I just have to use this syntax :

page.QuerySelector(string).QuerySelector(string).Key()

m_essaid
Valued Contributor

Re: QuerySelector and multiple parameters

Hi all,

I still have some issues with multiple selectors.

For example, I would like to click on the anchor-square that is in the "menu-anchor-4" :

 

anchor.png

I tried this :

Sys.Browser('edge').Page(Pagexxx).QuerySelector('#menu-anchor-4]').QuerySelector('[class="anchor-square"]').Click();

 

I think that I'm wrong while trying to select the id property of the li markup.

 

Anyone could help please ? Thank you !

AlexKaras
Community Hero

Re: QuerySelector and multiple parameters

Hi,

 

What is the result of the execution of your code?

Try to replace .Click() with .click(). (Small initial 'c') Does it help?

 

Regards,
  /Alex [Community Hero]
____
[Community Heroes] are not employed by SmartBear Software but
are just volunteers who have some experience with the tools by SmartBear Software
and a desire to help others. Posts made by [Community Heroes]
may differ from the official policies of SmartBear Software and should be treated
as the own private opinion of their authors and under no circumstances as an
official answer from SmartBear Software.
The [Community Hero] signature is used with permission by SmartBear Software.
https://community.smartbear.com/t5/custom/page/page-id/hall-of-fame
================================

View solution in original post

sonya_m
Community Manager

Re: QuerySelector and multiple parameters

Thanks Alex!

 

@m_essaid does this work for your case?


Sonya Mihaljova
Community and Education Specialist

Did my reply answer your question? Give Kudos or Accept it as a Solution to help others. ⬇️⬇️⬇️
New Here?
Join us and watch the welcome video:
Announcements
Top Kudoed Authors